59 lines
1.8 KiB
Vue
Raw Normal View History

2026-01-20 13:21:50 +08:00
<template>
<view>
<!-- 等待医生接诊卡片 -->
<view class="waiting-section">
<view class="waiting-bg"></view>
<view class="waiting-card-outer">
<view class="hospital-name">{{ order.hospitalName || '医院' }}</view>
<view class="waiting-consultation-card">
<view class="waiting-card-row">
<image class="waiting-illust" src="/static/home/waiting-illust.png" mode="aspectFit"></image>
<view class="waiting-title-row">
<text class="waiting-title">等待医生接诊.....</text>
</view>
<view class="doctor-avatar-outer">
<image class="doctor-avatar" :src="avatar" mode="aspectFill">
</image>
</view>
</view>
<view class="waiting-desc">为了更好的获得医生帮助请补充病情描述</view>
<view class="waiting-btn-wrap">
<button class="waiting-btn" @click="addSymptomDescription">
{{ hasFilledDescription ? '已提交病情描述' : '补充病情描述' }}
</button>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { computed } from 'vue';
const emit = defineEmits(['addSymptomDescription']);
const props = defineProps({
order: {
type: Object,
default: () => ({})
},
doctorInfo: {
type: Object,
default: () => ({})
}
})
const hasFilledDescription = computed(() => props.order && ('description' in props.order));
2026-01-22 16:35:05 +08:00
const avatar = computed(() => props.doctorInfo?.avatar || '/static/home/avatar.svg')
2026-01-20 13:21:50 +08:00
function addSymptomDescription() {
if (!hasFilledDescription.value) {
emit('addSymptomDescription')
}
}
</script>
<style lang="scss" scoped>
@import "../chat.scss";
</style>