2026-08-25 13:38:40 +08:00

85 lines
1.7 KiB
Vue

<template>
<view class="manual-rx-card border shadow-lg rounded" :style="elderVarStyle">
<view class="manual-title-row">
<view class="warning-icon">!</view>
<text class="manual-title">需要人工开方</text>
</view>
<text class="manual-reason">{{ reason }}</text>
</view>
</template>
<script setup>
import { computed } from "vue";
import { storeToRefs } from "pinia";
import useElder from "@/hooks/useElder";
const { elderVarStyle } = storeToRefs(useElder());
const props = defineProps({
extension: {
type: [Object, String],
default: "",
},
});
const reason = computed(() => {
if (typeof props.extension === "string" && props.extension.trim()) {
return props.extension.trim();
}
if (
props.extension &&
typeof props.extension === "object" &&
typeof props.extension.reason === "string" &&
props.extension.reason.trim()
) {
return props.extension.reason.trim();
}
return "订单中含高风险药品,已停止自动开方,请医生人工开方。";
});
</script>
<style scoped lang="scss">
.manual-rx-card {
box-sizing: border-box;
max-width: 100%;
margin-bottom: 30rpx;
padding: 24rpx 30rpx;
background: #fff;
}
.manual-title-row {
display: flex;
align-items: center;
}
.warning-icon {
flex-shrink: 0;
width: 30rpx;
height: 30rpx;
color: #fff;
background: #f79009;
border-radius: 50%;
font-size: 22rpx;
font-weight: 700;
line-height: 30rpx;
text-align: center;
}
.manual-title {
margin-left: 12rpx;
color: #b54708;
font-size: var(--text-base);
font-weight: 500;
line-height: 1.4;
}
.manual-reason {
display: block;
margin-top: 18rpx;
color: #4b5563;
font-size: var(--text-base);
line-height: 1.75;
word-break: break-all;
}
</style>