chenyc
2025-08-26 e282a4f46cde7f6db374946598cec8e7112a0530
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<template>
    <div class="blood-test-report">
        <van-popup v-model:show="showPopup" position="bottom" :style="{ height: '100%' }">
            <van-nav-bar
                title=""
                left-text="返回"
                left-arrow
                @click-left="onClickLeft"
            />
 
            <div class="report-container">
                <div class="report-headerda">
                    <div class="report-header">
                        <div class="title">{{reportData.itemGroupName}}</div>
                        <div class="hospital"></div>
                        <img src="@/assets/xueye.png" alt="Blood Icon" class="blood-icon" />
                    </div>
                    <div class="report-details">
                        <div class="doctor">申请医生:</div>
                        <div class="date">报告时间:{{reportData.date}}</div>
                    </div>
                </div>
                <table class="report-table">
                    <thead>
                        <tr>
                            <th>检查项</th>
                            <th>结果</th>
                            <th>参考值/单位</th>
                            <!-- <th>趋势图</th> -->
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(item, index) in reportData.itemGroupItems" :key="index">
                            <td>{{ item.item_name }}</td>
                            :'↓'                        <td>{{ item.item_result }} <b v-if="item.item_result_flag === 'g' || item.item_result_flag === 'd'" :style="{ color: item.item_result_flag === 'g' ? '#F56C6C' : '#409EFF' }">{{item.item_result_flag === 'g' ? '↑' : '↓'}}</b></td>
                            <td>{{ item.item_result_ref }}/{{item.item_result_unit}}</td>
                            <!-- <td><img :src="item.trendIcon" alt="Trend Icon" /></td> -->
                        </tr>
                    </tbody>
                </table>
            </div>
        </van-popup>
    </div>
</template>
 
  <script setup>
    import { ref } from 'vue'
    //   import listIoc from '@/assets/listIoc.png';
 
    const showPopup = ref(false)
 
    const reportData=ref({
        date:'',
        itemGroupName:'',
        itemGroupItems:[]
    })
    const onClickLeft = () => {
        showPopup.value = false
    }
    const showSet=(viveData)=>{
        console.log(viveData)
        reportData.value=Object.assign({},viveData)
        showPopup.value=true
    }
    defineExpose ({
        showSet
    })
  </script>
 
  <style scoped>
    .blood-test-report {
        text-align: center;
        background-color: #f0f4f8;
    }
 
    .report-container {
        padding: 10pt;
        background-color: #f0f4f8;
        min-height: 100%;
    }
 
    .report-headerda {
        border: 1px solid #ddd;
        padding: 8px;
        margin-bottom: 10px;
    }
 
    .report-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1pt solid #707070;
    }
 
    .title {
        font-size: 18px;
        font-weight: bold;
    }
 
    .hospital {
        font-size: 14px;
        color: #666;
    }
 
    .blood-icon {
        width: 50px;
        height: 50px;
    }
 
    .report-details {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
    }
 
    .doctor,
    .date {
        font-size: 14px;
        color: #666;
    }
 
    .report-table {
        width: 100%;
        border-collapse: collapse;
    }
 
    .report-table th,
    .report-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: center;
    }
 
    .report-table th {
        background-color: #e6f2ff;
    }
  </style>