|
@@ -1,23 +1,26 @@
|
|
<template>
|
|
<template>
|
|
- <view class="top-card" v-if="info">
|
|
|
|
- <view class="card-top">
|
|
|
|
- <image mode="heightFix" src="/static/image/head.png" />
|
|
|
|
- <view class="card-top-right">
|
|
|
|
- <view class="card-top-right-name">{{info.name}}<text class="iconfont" @click="onClick">{{ showIcon ? '' : '' }}</text></view>
|
|
|
|
- <view>{{info.addr}}<text class="iconfont" @click="jumpAddress"></text></view>
|
|
|
|
- <view class="card-top-right-sex">{{info.sex}} | {{info.text}}</view>
|
|
|
|
|
|
+ <view class="top-card">
|
|
|
|
+ <pub-loading-view :loaded="loaded" height="100%">
|
|
|
|
+ <view class="card-top" v-if="info">
|
|
|
|
+ <image mode="heightFix" src="/static/image/head.png" />
|
|
|
|
+ <view class="card-top-right">
|
|
|
|
+ <view class="card-top-right-name">{{info.name}}<text class="iconfont"
|
|
|
|
+ @click="onClick">{{ showIcon ? '' : '' }}</text></view>
|
|
|
|
+ <view>{{info.addr}}<text class="iconfont" @click="jumpAddress"></text></view>
|
|
|
|
+ <view class="card-top-right-sex">{{info.sex}} | {{info.text}}</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="card-bottom">
|
|
|
|
- <view>
|
|
|
|
- <view class="label">证件号码</view>
|
|
|
|
- <view>{{info.idCard}}</view>
|
|
|
|
|
|
+ <view class="card-bottom" v-if="info">
|
|
|
|
+ <view>
|
|
|
|
+ <view class="label">证件号码</view>
|
|
|
|
+ <view>{{info.idCard}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="second">
|
|
|
|
+ <view class="label">最近就诊</view>
|
|
|
|
+ <view>{{info.date}}</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="second">
|
|
|
|
- <view class="label">最近就诊</view>
|
|
|
|
- <view>{{info.date}}</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ </pub-loading-view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
@@ -29,80 +32,83 @@
|
|
getSexByCardNo,
|
|
getSexByCardNo,
|
|
maskCardNo,
|
|
maskCardNo,
|
|
maskName,
|
|
maskName,
|
|
- } from '@/lib/util'
|
|
|
|
|
|
+ } from '@/lib/util'
|
|
import { BasicInfoVO } from '../../lib/type';
|
|
import { BasicInfoVO } from '../../lib/type';
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
const showIcon = ref(false)
|
|
const showIcon = ref(false)
|
|
const originalInfo = ref({
|
|
const originalInfo = ref({
|
|
name: '',
|
|
name: '',
|
|
address: '',
|
|
address: '',
|
|
- addressDetails:'',
|
|
|
|
|
|
+ addressDetails: '',
|
|
addr: '',
|
|
addr: '',
|
|
sex: '',
|
|
sex: '',
|
|
text: '近三个月就诊记录',
|
|
text: '近三个月就诊记录',
|
|
idCard: '',
|
|
idCard: '',
|
|
date: ''
|
|
date: ''
|
|
})
|
|
})
|
|
- const info = ref({ ...originalInfo.value})
|
|
|
|
|
|
+ const info = ref({ ...originalInfo.value })
|
|
const dataList = ref({
|
|
const dataList = ref({
|
|
hzsfzh: '510224196901293189',
|
|
hzsfzh: '510224196901293189',
|
|
hzxm: '刘秀碧',
|
|
hzxm: '刘秀碧',
|
|
})
|
|
})
|
|
-
|
|
|
|
- const onClick = ()=> {
|
|
|
|
|
|
+ const loaded = ref(false)
|
|
|
|
+
|
|
|
|
+ const onClick = () => {
|
|
showIcon.value = !showIcon.value
|
|
showIcon.value = !showIcon.value
|
|
onUpdate(showIcon.value)
|
|
onUpdate(showIcon.value)
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// 地址信息拼接
|
|
// 地址信息拼接
|
|
- const addressInfSplice = (basic:string, details:string, isShow) => {
|
|
|
|
- if (isShow) {
|
|
|
|
- return basic + details;
|
|
|
|
- } else {
|
|
|
|
- return basic + '*'.repeat(details.length);
|
|
|
|
- }
|
|
|
|
|
|
+ const addressInfSplice = (basic : string, details : string, isShow) => {
|
|
|
|
+ if (isShow) {
|
|
|
|
+ return basic + details;
|
|
|
|
+ } else {
|
|
|
|
+ return basic + '*'.repeat(details.length);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
const getInfo = async () => {
|
|
const getInfo = async () => {
|
|
- let basicInfo = await rest.get('/app-api/bmfw/findList',{zjhm: dataList.value.hzsfzh}) as BasicInfoVO
|
|
|
|
- let addressInfo = await rest.get('/default/consignee-info/list',{hzid:dataList.value.hzsfzh}) as BasicInfoVO
|
|
|
|
|
|
+ loaded.value = true
|
|
|
|
+ let basicInfo = await rest.get('/app-api/bmfw/findList', { zjhm: dataList.value.hzsfzh }) as BasicInfoVO
|
|
|
|
+ let addressInfo = await rest.get('/default/consignee-info/list', { hzid: dataList.value.hzsfzh }) as BasicInfoVO
|
|
|
|
+ loaded.value = false
|
|
if (Array.isArray(basicInfo.list) && basicInfo.list.length > 0) {
|
|
if (Array.isArray(basicInfo.list) && basicInfo.list.length > 0) {
|
|
const firstBasicInfo = basicInfo.list[0]
|
|
const firstBasicInfo = basicInfo.list[0]
|
|
originalInfo.value.name = dataList.value.hzxm
|
|
originalInfo.value.name = dataList.value.hzxm
|
|
originalInfo.value.sex = getSexByCardNo(dataList.value.hzsfzh)
|
|
originalInfo.value.sex = getSexByCardNo(dataList.value.hzsfzh)
|
|
originalInfo.value.idCard = dataList.value.hzsfzh
|
|
originalInfo.value.idCard = dataList.value.hzsfzh
|
|
- originalInfo.value.date = formatDate(firstBasicInfo.kfrq,'{y}-{m}-{d}')
|
|
|
|
|
|
+ originalInfo.value.date = formatDate(firstBasicInfo.kfrq, '{y}-{m}-{d}')
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
if (Array.isArray(addressInfo.list) && addressInfo.list.length > 0) {
|
|
if (Array.isArray(addressInfo.list) && addressInfo.list.length > 0) {
|
|
- const firstAddressInfo = addressInfo.list[0]
|
|
|
|
- originalInfo.value.address = `${firstAddressInfo.province || ''}${firstAddressInfo.city || ''}${firstAddressInfo.area || ''}`
|
|
|
|
|
|
+ const firstAddressInfo = addressInfo.list[0]
|
|
|
|
+ originalInfo.value.address = `${firstAddressInfo.province || ''}${firstAddressInfo.city || ''}${firstAddressInfo.area || ''}`
|
|
originalInfo.value.addressDetails = firstAddressInfo.shrdzxxdz
|
|
originalInfo.value.addressDetails = firstAddressInfo.shrdzxxdz
|
|
}
|
|
}
|
|
onUpdate(false)
|
|
onUpdate(false)
|
|
}
|
|
}
|
|
-
|
|
|
|
- const onUpdate = (isMasked: boolean) => {
|
|
|
|
- Object.assign(info.value, {
|
|
|
|
- name: isMasked ? maskName(originalInfo.value.name) : originalInfo.value.name,
|
|
|
|
- addr: addressInfSplice(originalInfo.value.address, originalInfo.value.addressDetails, !isMasked),
|
|
|
|
- idCard: isMasked ? maskCardNo(originalInfo.value.idCard) : originalInfo.value.idCard,
|
|
|
|
- sex: getSexByCardNo(originalInfo.value.idCard),
|
|
|
|
- date: originalInfo.value.date
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
|
|
+ const onUpdate = (isMasked : boolean) => {
|
|
|
|
+ Object.assign(info.value, {
|
|
|
|
+ name: isMasked ? maskName(originalInfo.value.name) : originalInfo.value.name,
|
|
|
|
+ addr: addressInfSplice(originalInfo.value.address, originalInfo.value.addressDetails, !isMasked),
|
|
|
|
+ idCard: isMasked ? maskCardNo(originalInfo.value.idCard) : originalInfo.value.idCard,
|
|
|
|
+ sex: getSexByCardNo(originalInfo.value.idCard),
|
|
|
|
+ date: originalInfo.value.date
|
|
|
|
+ })
|
|
}
|
|
}
|
|
-
|
|
|
|
- const jumpAddress = ()=> {
|
|
|
|
- console.log("内容",originalInfo.value.idCard)
|
|
|
|
|
|
+
|
|
|
|
+ const jumpAddress = () => {
|
|
|
|
+ console.log("内容", originalInfo.value.idCard)
|
|
link.goAddressList(originalInfo.value.idCard)
|
|
link.goAddressList(originalInfo.value.idCard)
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
dataList.value = uni.getStorageSync("userInfo")
|
|
dataList.value = uni.getStorageSync("userInfo")
|
|
- console.log("Top",dataList.value)
|
|
|
|
|
|
+ console.log("Top", dataList.value)
|
|
getInfo()
|
|
getInfo()
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
@@ -113,6 +119,7 @@
|
|
background: $uni-color-primary;
|
|
background: $uni-color-primary;
|
|
padding: $uni-spacing-col-s2 $page-row-spacing $uni-spacing-col-s4;
|
|
padding: $uni-spacing-col-s2 $page-row-spacing $uni-spacing-col-s4;
|
|
border: 1px solid $uni-border-color;
|
|
border: 1px solid $uni-border-color;
|
|
|
|
+ min-height: 340rpx;
|
|
|
|
|
|
.card-top {
|
|
.card-top {
|
|
@include flex;
|
|
@include flex;
|
|
@@ -135,10 +142,11 @@
|
|
}
|
|
}
|
|
|
|
|
|
.card-top-right-name {
|
|
.card-top-right-name {
|
|
- font-size: $uni-font-size-xxxl;
|
|
|
|
- line-height: $uni-line-height-xxxl;
|
|
|
|
|
|
+ font-size: $uni-font-size-xxl;
|
|
|
|
+ line-height: $uni-line-height-xxl;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
+
|
|
.iconfont {
|
|
.iconfont {
|
|
line-height: $uni-line-height-xxxl;
|
|
line-height: $uni-line-height-xxxl;
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|
|
@@ -173,6 +181,7 @@
|
|
|
|
|
|
.second {
|
|
.second {
|
|
position: relative;
|
|
position: relative;
|
|
|
|
+ flex: 0.8;
|
|
|
|
|
|
&::before {
|
|
&::before {
|
|
content: '';
|
|
content: '';
|
|
@@ -180,7 +189,7 @@
|
|
left: 0;
|
|
left: 0;
|
|
background: $uni-border-color;
|
|
background: $uni-border-color;
|
|
width: 1px;
|
|
width: 1px;
|
|
- height: 80rpx;
|
|
|
|
|
|
+ height: 100rpx;
|
|
-webkit-transform: scaleX(0.5);
|
|
-webkit-transform: scaleX(0.5);
|
|
transform: scaleX(0.5);
|
|
transform: scaleX(0.5);
|
|
-webkit-transform-origin: 0 0;
|
|
-webkit-transform-origin: 0 0;
|