gx
chenyc
2025-02-24 5d4befca627d728b40bec39d10c09bc0e0144aed
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<template>
    <div class="personal layout-pd">
        <el-form size="small" :inline="true" :model="state.formInline"> 
            <el-form-item label="填报日期">
                <el-date-picker
                    v-model="state.formInline.date"
                    type="daterange"
                    unlink-panels
                    range-separator="To"
                    start-placeholder="开始"
                    end-placeholder="结束"
                    :shortcuts="shortcuts"
                    format="YYYY/MM/DD"
                    value-format="YYYY-MM-DD"
                />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">查询</el-button>
            </el-form-item>
        </el-form>
 
        <div>
            <table id="tabledome" class="gridtable">
                <tr>
                    <th colspan="22">健康管理服务明细表</th>
                </tr>
                <tr>
                    <td colspan="10">服务单位:{{clientName}}</td>
                    <td colspan="22">服务期({{state.formInline.date[0]}}到{{state.formInline.date[2]}})</td>
                </tr>
                <tr>
                    <th rowspan="2">序号</th>
                    <th rowspan="2">姓名</th>
                    <th rowspan="2">干体重</th>
                    <th rowspan="2">最新生化检验数据更新</th>
                    <th colspan="5">营养风险&营养评估</th>
                    <th rowspan="2">膳食调查</th>
                    <th colspan="8">个性化饮食指导</th>
                    <th>团体宣教</th>
                    <th rowspan="2">随访跟进</th>
                    <th rowspan="2">营养咨询回复</th>
                    <th rowspan="2">购买套餐</th>
                </tr>
                <tr>
                
                    <th>NRS-2002</th>
                    <th>SGA</th>
                    <th>MIS</th>
                    <th>GNRI</th>
                    <th>PEW</th>
                    <!-- <th>膳食调查</th> -->
                    <!-- <th colspan="8">个性化饮食指导</th> -->
                    <th>控磷</th>
                    <th>控钾</th>
                    <th>控水</th>
                    <th>贫血</th>
                    <th>蛋白质</th>
                    <th>便秘</th>
                    <th>腹泻</th>
                    <th>体重管理</th>
                    <th style="color: red;">专题勾选</th>
                    
                    
                </tr>
                <tbody>
 
                    <tr v-for="(row,index)  in state.tableData" :key="index">
                        <td>{{index+1}}</td>
                        <td>{{row?.patientName}}</td>
                        <td>{{row?.patientDryWeight}}</td>
                        <td>{{row?.checkIsData?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['NRS-2002']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['SGA']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['MIS']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['GNRI']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['PEW']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['膳食生活调查表']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['营养饮食指导方案']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['营养饮食指导方案']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['营养饮食指导方案']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['营养饮食指导方案']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['营养饮食指导方案']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['营养饮食指导方案']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['营养饮食指导方案']?.id?'✔':''}}</td>
                        <td>{{row?.surveryTimeMap?.['营养饮食指导方案']?.id?'✔':''}}</td>
                        <td></td>
                        <td>{{row?.surveryTimeMap?.['随访记录']?.id?'✔':''}}</td>
                        <td></td>
                        <td></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</template>
 
<script setup lang="ts" name="personal">
import { reactive, computed, onMounted, ref } from 'vue';
import { formatAxis } from '/@/utils/formatTime';
import { storeToRefs } from 'pinia';
import { useUserInfo } from '/@/stores/userInfo';
import {nutritionalSummary} from '/@/api/Patients'
import {editUserInfo} from '/@/api/login'
import { ElLoading } from 'element-plus';
import {formatDate} from '/@/utils/formatTime'
const stores = useUserInfo();
const { userInfos } = storeToRefs(stores);
const shortcuts = [
  {
    text: '上一周',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      return [start, end]
    },
  },
  {
    text: '上一个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
      return [start, end]
    },
  },
  {
    text: '前三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
      return [start, end]
    },
  },
]
const clientName=computed(()=>{
    return userInfos.value.clientName
})
const tableHe = computed(() => {
    let height = document.documentElement.clientHeight;
    console.log('窗口高度')
    const navDom = document.querySelector('.layout-navbars-breadcrumb-index');
    if (navDom) {
        height -= navDom.scrollHeight;
    }
    return height+'px'
})
// 当前时间提示语
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
const state = reactive({
    tableData: <any>[],
    page:1,
    size:10,
    total:0,
    loading: false,
    formInline:{
        date: [formatDate(start,'YYYY-mm-dd'), formatDate(end,'YYYY-mm-dd')],
    },
    dialogTableVisible:false
})
const onSubmit=()=>{
    const pasm={
        startTime:state.formInline.date[0]+ ' 00:00:00',
        endTime:state.formInline.date[1]+ ' 23:59:59',
        clientCode:userInfos.value.clientCode,
        queryValue:''
    }
    console.log(pasm)
    nutritionalSummary(pasm).then(re=>{
        console.log(re.data)
        state.tableData=re.data
    })
 
}
onMounted(()=>{
    onSubmit()
})
</script>
 
<style scoped lang="scss">
.gridtable {
    width: 100%;
    font-family: verdana, arial, sans-serif;
    font-size: 11px;
    color: #333333;
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;
   
}
 
.gridtable th {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #a4b0e2;
}
 
.gridtable td {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #ffffff;
    text-align: center;
}
</style>