288 lines
5.8 KiB
Vue
288 lines
5.8 KiB
Vue
<template>
|
|
<view class="app">
|
|
<u-mask :show="usershow" class='mask'>
|
|
<view class="information">
|
|
<image src="../../static/information.png" mode=""></image>
|
|
<view class="title">
|
|
请完善个人信息
|
|
</view>
|
|
<view class="cancel">
|
|
取消
|
|
</view>
|
|
<view class="determine">
|
|
去完善
|
|
</view>
|
|
</view>
|
|
</u-mask>
|
|
<view class="" style="background-color: #F4F5F7;height: 20rpx;width:100%">
|
|
</view>
|
|
<view class="userinfo info">
|
|
<view class="item">
|
|
<span>姓名:</span>
|
|
<!-- <input type="text"> -->
|
|
<u-input v-model="query.patientName" type="text" placeholder='' maxlength='5' />
|
|
</view>
|
|
<view class="item">
|
|
<span>电话:</span>
|
|
<u-input v-model="query.phone" maxlength='11' type="text" placeholder='' />
|
|
</view>
|
|
<view class="item">
|
|
<span>身份证号:</span>
|
|
<u-input v-model="query.cardNo" type="text" placeholder='' maxlength='18' />
|
|
</view>
|
|
<view class="item" @tap='areashow=true'>
|
|
<span>所属区域:</span>
|
|
<view></view>
|
|
<u-select v-model="areashow" label-name='areaName' value-name='areaCode' mode="mutil-column-auto"
|
|
:list="arealist" @confirm="areaconfirm"></u-select>
|
|
</view>
|
|
<view class="item">
|
|
<span>详细地址:</span>
|
|
<u-input v-model="query.address" type="text" placeholder='' />
|
|
</view>
|
|
<view class="item" @tap='getAddress()'>
|
|
<span>所在位置:</span>
|
|
<view></view>
|
|
<!-- <u-input type="text" placeholder='' /> -->
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="info">
|
|
<view class="service">
|
|
<view class="title">
|
|
所属服务
|
|
</view>
|
|
<view class="Multiplechoice">
|
|
<view class="choice" @tap="gondisease">
|
|
服务1
|
|
</view>
|
|
<view class="choice" v-for="(item,index) in getNurseTypelist" :key="index">
|
|
{{item.nurseTypeName}}
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-button type="primary" @tap='a'>主要按钮</u-button>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getRegionAndStreetInfo,
|
|
getNurseType
|
|
} from '@/api/information/index.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
usershow: false, //完善信息开关
|
|
arealist: [], //区街道list
|
|
areashow: false, //经纬度开关
|
|
getNurseTypelist: [], //护理类型数组
|
|
query: { //信息请求数组
|
|
patientName: "",
|
|
cardNo: "",
|
|
phone: "",
|
|
address: "",
|
|
areaCode: "",
|
|
nurseTypeIdList: [],
|
|
diseaseInfoList: [],
|
|
}
|
|
};
|
|
},
|
|
//进入界面加载
|
|
onLoad() {
|
|
this.areaInfo()
|
|
this.getNurseTypeInfo();
|
|
},
|
|
methods: {
|
|
a() {
|
|
console.log(this.query)
|
|
},
|
|
//获取所在位置
|
|
getAddress() {
|
|
uni.chooseLocation({
|
|
success: function(res) {
|
|
console.log('位置名称:' + res.name);
|
|
console.log('详细地址:' + res.address);
|
|
console.log('纬度:' + res.latitude);
|
|
console.log('经度:' + res.longitude);
|
|
}
|
|
});
|
|
},
|
|
//护理类型请求
|
|
getNurseTypeInfo() {
|
|
getNurseType().then(res => {
|
|
this.getNurseTypelist = res.data
|
|
})
|
|
},
|
|
//区街道
|
|
areaInfo() {
|
|
getRegionAndStreetInfo().then(res => {
|
|
res.data.forEach(e => {
|
|
if (e.children.length == 0) {
|
|
e.children.push({
|
|
areaCode: "",
|
|
areaName: "暂无街道",
|
|
children: null,
|
|
id: '',
|
|
})
|
|
}
|
|
})
|
|
this.arealist = res.data;
|
|
console.log(this.arealist)
|
|
})
|
|
},
|
|
//区街道选择
|
|
areaconfirm(e) {
|
|
console.log(e)
|
|
// this.form.areaCode = e[e.length - 1].value
|
|
// this.address = e[0].label + '-' + e[1].label
|
|
// this.address = e[0].label + '-' + e[1].label + '-' + e[2].label
|
|
// console.log(this.address);
|
|
},
|
|
//点击医疗护理跳转
|
|
gondisease() {
|
|
uni.navigateTo({
|
|
url: '/pages/disease/disease'
|
|
})
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
<style lang="scss">
|
|
.app {
|
|
.service {
|
|
width: 90%;
|
|
margin: 0 auto;
|
|
padding-bottom: 15rpx;
|
|
|
|
.Multiplechoice {
|
|
font-size: 32rpx;
|
|
color: #FFFFFF;
|
|
width: 100%;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: space-between;
|
|
|
|
.choice {
|
|
text-align: center;
|
|
line-height: 70rpx;
|
|
width: 190rpx;
|
|
height: 70rpx;
|
|
background: #BFBFBF;
|
|
border-radius: 26rpx;
|
|
margin-top: 30rpx;
|
|
}
|
|
}
|
|
|
|
.title {
|
|
font-size: 36rpx;
|
|
padding-top: 36rpx;
|
|
}
|
|
}
|
|
|
|
.info {
|
|
width: 90%;
|
|
margin: 0 auto 20rpx;
|
|
background-color: #FFFFFF;
|
|
border-radius: 20rpx;
|
|
padding-bottom: 5rpx;
|
|
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
|
}
|
|
|
|
|
|
.userinfo {
|
|
.item {
|
|
width: 90%;
|
|
margin: 0 auto;
|
|
height: 120rpx;
|
|
line-height: 120rpx;
|
|
border-bottom: 1rpx solid #D8D4D4;
|
|
display: flex;
|
|
|
|
view {
|
|
height: 120rpx;
|
|
font-size: 32rpx;
|
|
line-height: 120rpx;
|
|
}
|
|
|
|
span {
|
|
display: inline-block;
|
|
line-height: 120rpx;
|
|
height: 120rpx;
|
|
width: 30%;
|
|
font-size: 32rpx;
|
|
}
|
|
|
|
::v-deep .u-input__input {
|
|
height: 120rpx;
|
|
font-size: 32rpx;
|
|
}
|
|
|
|
::v-deep .uni-input-wrapper {
|
|
height: 120rpx;
|
|
line-height: 120rpx;
|
|
}
|
|
|
|
::v-deep .u-input {
|
|
width: 70%;
|
|
height: 120rpx;
|
|
line-height: 120rpx;
|
|
}
|
|
}
|
|
|
|
.item:nth-child(6) {
|
|
border: 0;
|
|
}
|
|
}
|
|
|
|
.mask {
|
|
.information {
|
|
width: 70%;
|
|
height: 400rpx;
|
|
margin: 50% auto;
|
|
background: #FFFFFF;
|
|
border-radius: 30rpx;
|
|
text-align: center;
|
|
color: #FFFFFF;
|
|
position: relative;
|
|
|
|
.determine,
|
|
.cancel {
|
|
width: 200rpx;
|
|
height: 70rpx;
|
|
border-radius: 26rpx;
|
|
font-size: 34rpx;
|
|
line-height: 70rpx;
|
|
position: absolute;
|
|
top: 74%;
|
|
}
|
|
|
|
.determine {
|
|
background: #4C7BC9;
|
|
right: 36rpx;
|
|
}
|
|
|
|
.cancel {
|
|
background: #C5BFBF;
|
|
left: 36rpx;
|
|
}
|
|
|
|
.title {
|
|
font-size: 42rpx;
|
|
margin-top: 40rpx;
|
|
color: #000000;
|
|
}
|
|
|
|
image {
|
|
width: 100rpx;
|
|
height: 100rpx;
|
|
margin: 10% 0 0 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|