chenyc
2024-08-21 59ba223820054f296191f581bd413f5b9cff9e7f
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
<template>
    <div class="dietarySurvey-home">
        <div v-if="patientsInfo.id">
            <table class="gridtable">
                <tr>
                    <th colspan="4">膳食调查表</th>
                    <th>初次调查日期</th>
                    <th></th>
                </tr>
                <tr>
                    <th colspan="4"></th>
                    <th>更新日期</th>
                    <th></th>
                </tr>
                <tr>
                    <th colspan="4"></th>
                    <th>记录者</th>
                    <th></th>
                </tr>
                <tr>
                    <td>
                        1.人员构成
                    </td>
                    <td>
                       独居
                    </td>
                    <td>
                        (  )人
                    </td>
                    <td>
                        家族
                    </td>
                    <td colspan="2">
                       (        )
                    </td>
                    
                </tr>
                <tr>
                    <td>
                        2.烹饪主要操作者
                    </td>
                    <td>
                        本人
                    </td>
                    <td>
                        配偶
                    </td>
                    <td>
                        其他
                    </td>
                    <td colspan="2">
                       (        )
                    </td>
                    
                </tr>
                <tr>
                    <td>
                        3.食材采购
                    </td>
                    <td>
                        外采
                    </td>
                    <td>
                        家种
                    </td>
                    <td>
                       
                    </td>
                    <td colspan="2">
                      
                    </td>
                    
                </tr>
            </table>
 
        </div>
        <el-empty v-else description="无数据,请先选择患者"></el-empty>
    </div>
 
</template>
 
<script setup lang="ts">
import { storeToRefs } from 'pinia';
import { usePatientsInfo } from '/@/stores/patientsInfo';
import { computed, reactive } from 'vue';
const storesPat = usePatientsInfo();
const { patientsInfo } = storeToRefs(storesPat);
const props = defineProps(['tableHeight'])
const state = reactive({
    tableData: [],
    loading: false,
})
const tableHe = computed(() => {
    return props.tableHeight - 130
})
// 第一步:定义子组件里面的方法
const getData = (str: string) => {
    console.log("子组件获取显示数据!" + str);
    console.log(props.tableHeight)
    var pam = {
        patientCode: patientsInfo.value.code,
        page: 1,
        size: 100,
        orderType: 1,
        orderIsUse: 2,
        desc: 1,
        orderName: '',
    }
    state.loading = true
 
}
 
// 第二步:暴露方法
defineExpose({ getData })
</script>
 
<style  lang="scss">
 
 
    .gridtable {font-family: verdana,arial,sans-serif;font-size:11px;color:#333333;border-width: 1px;border-color: #666666;border-collapse: collapse;width: 100%;}
 
    .gridtable th {border-width: 1px;padding: 8px;border-style: solid;border-color: #666666;background-color: #dedede;}
 
    .gridtable td {border-width: 1px;padding: 8px;border-style: solid;border-color: #666666;background-color: #ffffff;}
 
 
</style>