123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <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"></text></view>
- <view class="card-top-right-sex">{{info.sex}} | {{info.text}}</view>
- </view>
- </view>
- <view class="card-bottom">
- <view>
- <view class="label">证件号码</view>
- <view>{{info.idCard}}</view>
- </view>
- <view class="second">
- <view class="label">最近就诊</view>
- <view>{{info.date}}</view>
- </view>
- </view>
- </view>
- </template>
- <script lang="ts" setup>
- import { PropType, ref } from 'vue'
-
- const emit = defineEmits(['update'])
- defineProps({
- info: {
- type: Object as PropType<any>,
- default: () => ({}),
- },
- })
- const showIcon = ref(false)
- const onClick = ()=> {
- showIcon.value = !showIcon.value
- emit('update',showIcon.value)
- }
- </script>
- <style lang="scss" scoped>
- .top-card {
- border-radius: 0px 0px $uni-spacing-row-s2 $uni-spacing-row-s2;
- background: $uni-color-primary;
- padding: $uni-spacing-col-s2 $page-row-spacing $uni-spacing-col-s4;
- border: 1px solid $uni-border-color;
- .card-top {
- @include flex;
- margin-bottom: $uni-spacing-col-s4;
- color: #fff;
- image {
- width: 140rpx;
- height: 140rpx;
- display: block;
- margin-right: $uni-spacing-row-s4;
- }
- .card-top-right {
- flex: 1;
- line-height: $uni-line-height-base;
- .iconfont {
- margin-left: 8rpx;
- }
- .card-top-right-name {
- font-size: $uni-font-size-xxxl;
- line-height: $uni-line-height-xxxl;
- display: flex;
- align-items: center;
- .iconfont {
- line-height: $uni-line-height-xxxl;
- font-size: 32rpx;
- }
- }
- .card-top-right-sex {
- font-size: $uni-font-size-sm;
- line-height: $uni-line-height-sm;
- }
- }
- }
- .card-bottom {
- background-color: #fff;
- color: $uni-text-color;
- border-radius: $uni-spacing-row-s2;
- padding: $uni-spacing-row-s4;
- line-height: $uni-line-height-base;
- @include flex;
- >view {
- flex: 1;
- @include flex;
- flex-direction: column;
- }
- .label {
- color: $uni-text-color-grey;
- margin-bottom: 24rpx;
- }
- .second {
- position: relative;
- &::before {
- content: '';
- position: absolute;
- left: 0;
- background: $uni-border-color;
- width: 1px;
- height: 80rpx;
- -webkit-transform: scaleX(0.5);
- transform: scaleX(0.5);
- -webkit-transform-origin: 0 0;
- transform-origin: 0 0;
- }
- }
- }
- }
- </style>
|