| src/views/home/components/pingubiao/editDietary4.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/home/components/pingubiao/editDietary5.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/home/components/pingubiao/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/home/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/home/components/pingubiao/editDietary4.vue
New file @@ -0,0 +1,346 @@ <template> <div class="dietarySurvey-item"> <el-dialog v-model="state.dialogTableVisible" title="PEW(蛋白质能量消耗评估)" :fullscreen="true" width="100%"> <div class="container" style="width: 100%; height: 100%;overflow: auto;"> <div> <div> <el-form size="small" > <div style="width: 100%"> <table id="tabledome" class="gridtable"> <tr> <th colspan="2"> <el-form-item label="初次调查日期"> <el-date-picker v-model="state.tableData.初次调查日期" type="date" style="width: 100px;" placeholder="" format="YYYY/MM/DD" value-format="YYYY-MM-DD" /> </el-form-item> </th> <th colspan="2"> <el-form-item label="更新日期"> <el-date-picker v-model="state.tableData.更新日期" type="date" style="width: 100px;" placeholder="" format="YYYY/MM/DD" value-format="YYYY-MM-DD" /> </el-form-item> </th> <th colspan="2"> <el-form-item label="记录者"> <el-input v-model="state.tableData.记录者" style="width: 100px;" placeholder="" /> </el-form-item> </th> </tr> <tr> <th colspan="2"> 患者姓名:{{patientsInfo.patientName}} </th> <th colspan="2"> 年龄:{{patientsInfo.age}} </th> <th colspan="2">性别:{{patientsInfo.patientGenderText}}</th> </tr> <tr> <td colspan="" class="tdInput" style="text-align: center;"> 血清白蛋白浓度(g/L) </td> <td colspan="1" style="text-align: center;" > 打分 </td> </tr> <tr> <td colspan="5" style="background-color: antiquewhite;"> <!-- <el-form-item label="1、生化指标:"> <el-input v-model="state.tableData.生化指标.input1" type="textarea" :autosize="{ minRows: 2, maxRows: 6 }" placeholder="请饮食指导建议" /> </el-form-item> --> 1、生化指标:白蛋白<38g/L;前白蛋白<30mg/L(仅指透患者);胆固醇100mg/d1 </td> <td colspan="1" style="text-align: center;"> <el-radio-group v-model="state.tableData.生化指标.type"> <el-radio v-for="item in state.options" :value="item" :key="item">{{item===0?'不满足':'满足'}}</el-radio> </el-radio-group> </td> </tr> <tr> <td colspan="5" style="background-color: antiquewhite;"> <!-- <el-form-item label="2、体重指标:"> <el-input v-model="state.tableData.体重指标.input1" type="textarea" :autosize="{ minRows: 2, maxRows: 6 }" placeholder="请饮食指导建议" /> </el-form-item> --> 2、体重指标:BMI<23kg/m2;非有意的体重下降(3个月内>5%或半年内>10%);总体脂量<10% </td> <td colspan="1" style="text-align: center;"> <el-radio-group v-model="state.tableData.体重指标.type"> <el-radio v-for="item in state.options" :value="item" :key="item">{{item===0?'不满足':'满足'}}</el-radio> </el-radio-group> </td> </tr> <tr> <td colspan="5" style="background-color: antiquewhite;"> <!-- <el-form-item label="3、饮食蛋白质和/或热量摄入不足:"> <el-input v-model="state.tableData.饮食蛋白指标.input1" type="textarea" :autosize="{ minRows: 2, maxRows: 6 }" placeholder="请饮食指导建议" /> </el-form-item> --> 3、饮食蛋白质和/或热量摄入不足:透析患者DPI<0.8g/kg/d,或CKD2~5期<0.6g/kg/d,至少持续2月以上;DEI<25kcal/kg/d,至少持续2月以上 </td> <td colspan="1" style="text-align: center;"> <el-radio-group v-model="state.tableData.饮食蛋白指标.type"> <el-radio v-for="item in state.options" :value="item" :key="item">{{item===0?'不满足':'满足'}}</el-radio> </el-radio-group> </td> </tr><tr> <td colspan="5" style="background-color: antiquewhite;"> <!-- <el-form-item label=" 4、肌肉指标:"> <el-input v-model="state.tableData.肌肉指标.input1" type="textarea" :autosize="{ minRows: 2, maxRows: 6 }" placeholder="请饮食指导建议" /> </el-form-item> --> 4、肌肉指标:{{state.tableData.肌肉指标.input1}} </td> <td colspan="1" style="text-align: center;"> <el-radio-group v-model="state.tableData.肌肉指标.type"> <el-radio v-for="item in state.options" :value="item" :key="item">{{item===0?'不满足':'满足'}}</el-radio> </el-radio-group> </td> </tr> <tr> <td colspan="5" class="tdInput" style="color:coral;"> 根据2008年ISRNM推荐的指标进行诊断,满足以下4条诊断标准(每项中至少1项符合)考虑存在PEW </td> <td colspan="1" style="font-family: 600;color: blue; font-weight: 700;"> 合计满足 {{sum}} 项 </td> </tr> </table> </div> </el-form> </div> </div> </div> <template #footer> <div class="dialog-footer" style="text-align: center"> <el-button @click="funhui">取消</el-button> <el-button type="primary" @click="onSubmit"> 保存 </el-button> </div> </template> </el-dialog> </div> </template> <script setup lang="ts" name="visualizingLinkDemo2"> import { reactive, onMounted, onUnmounted, ref, computed } from 'vue'; import { formatDate } from '/@/utils/formatTime'; import { NextLoading } from '/@/utils/loading'; import { useUserInfo } from '/@/stores/userInfo'; import { usePatientsInfo } from '/@/stores/patientsInfo'; const storesPat = usePatientsInfo(); import {Add,update,deleteId,tiaochabiaoInfo} from '/@/api/tiaochabiao/index' import { storeToRefs } from 'pinia'; import { useRoute,useRouter } from 'vue-router'; import { ElMessage } from 'element-plus'; const stores = useUserInfo(); const { patientsInfo } = storeToRefs(storesPat); const { userInfos } = storeToRefs(stores); const router = useRouter() const emit = defineEmits([ "shuaxin" ]); const state = reactive({ options:[0,1], dialogTableVisible:false, tableData: { 表名: 'PEW(蛋白质能量消耗评估)', 初次调查日期:"", 填表日期: '', 更新日期: '', 记录者: '陈银成', 生化指标: { type: '', input1: '', }, 体重指标: { type: '', input1: '', }, 饮食蛋白指标:{ type: '', input1: '', }, 肌肉指标:{ type: '', input1: '', } }, loading: false, viewInfo:{ id: 0, code: '', clientCode: userInfos.value.clientCode, patientCode: patientsInfo.value.code, surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'), surveryPerson: userInfos.value.code, surveryJsonBody: '', suveryFormName:'PEW(蛋白质能量消耗评估)', surveryFormType:1, updateTime: '' } }) const sum = computed(() => { let x=0 for(let key in state.tableData){ console.log(key+'key=='+state.tableData[key]?.type) if(Number(state.tableData[key]?.type)){ x+=Number(state.tableData[key]?.type) } } return x }) const funhui=()=>{ state.dialogTableVisible=false } const onSubmit = () => { console.log('submit!') console.log(state.tableData) const info:tiaochabiaoInfo={ id: state.viewInfo.id, surveryFormType:1, code: state.viewInfo.code, clientCode: userInfos.value.clientCode, patientCode: patientsInfo.value.code, surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'), surveryPerson: userInfos.value.code, surveryJsonBody: JSON.stringify(state.tableData), suveryFormName:'PEW(蛋白质能量消耗评估)', updateTime: '' } console.log(info) if(info.id===0){ Add(info).then(re=>{ console.log(re.data) state.dialogTableVisible=false emit('shuaxin') }) }else if(info.id>0){ info.surveryTime=state.viewInfo.surveryTime update(info).then(re=>{ console.log(re.data) state.dialogTableVisible=false emit('shuaxin') }) } } // 第一步:定义子组件里面的方法 const getData = (str: string) => { console.log("子组件获取显示数据!" + str); state.loading = true } // 打开查看或者编辑明细 const openShow = (type: string,mode:tiaochabiaoInfo) => { console.log(type) if(type==='add'){ state.tableData.初次调查日期=formatDate(new Date(),'YYYY-mm-dd') state.tableData.更新日期=formatDate(new Date(),'YYYY-mm-dd') state.tableData.记录者=userInfos.value.userName getPageInfo() state.dialogTableVisible = true } else if(type==='update'){ console.log('------------------------3333333333333333') console.log(mode) state.viewInfo=mode state.tableData=JSON.parse(mode.surveryJsonBody) state.dialogTableVisible = true } } const getPageInfo=()=>{ state.tableData={ 表名: 'PEW(蛋白质能量消耗评估)', 初次调查日期:formatDate(new Date(),'YYYY-mm-dd'), 填表日期: '', 更新日期: formatDate(new Date(),'YYYY-mm-dd'), 记录者: userInfos.value.userName, 生化指标: { type: '', input1: '白蛋白<38g/L;前白蛋白<30mg/L(仅指透患者);胆固醇100mg/d1', }, 体重指标: { type: '', input1: 'BMI<23kg/m2;非有意的体重下降(3个月内>5%或半年内>10%);总体脂量<10%', }, 饮食蛋白指标:{ type: '', input1: '透析患者DPI<0.8g/kg/d,或CKD2~5期<0.6g/kg/d,至少持续2月以上;DEI<25kcal/kg/d,至少持续2月以上', }, 肌肉指标:{ type: '', input1: '肌肉量丢失(3个月内>5%或半年内>10%),上臂肌围减少(减少>10%参照群体第50个百分位数)', } } } // 第二步:暴露方法 defineExpose({ getData, openShow }) </script> <style scoped lang="scss"> .gridtable { 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; text-align: left; border-color: #666666; background-color: #a4b0e2; } .gridtable td { border-width: 1px; padding: 8px; border-style: solid; border-color: #666666; background-color: #ffffff; } .tdInput{ background: yellow; } </style> src/views/home/components/pingubiao/editDietary5.vue
New file @@ -0,0 +1,361 @@ <template> <div class="dietarySurvey-item"> <el-dialog v-model="state.dialogTableVisible" title="GNIR营养评估分" :fullscreen="true" width="100%"> <div class="container" style="width: 100%; height: 100%;overflow: auto;"> <div> <div> <el-form size="small"> <div style="width: 100%"> <table id="tabledome" class="gridtable"> <tr> <th colspan="2"> <el-form-item label="调查日期"> <el-date-picker v-model="state.tableData.初次调查日期" type="date" style="width: 100px;" placeholder="" format="YYYY/MM/DD" value-format="YYYY-MM-DD" /> </el-form-item> </th> <th colspan="2"> <el-form-item label="更新日期"> <el-date-picker v-model="state.tableData.更新日期" type="date" style="width: 100px;" placeholder="" format="YYYY/MM/DD" value-format="YYYY-MM-DD" /> </el-form-item> </th> <th colspan="2"> <el-form-item label="记录者"> <el-input v-model="state.tableData.记录者" style="width: 100px;" placeholder="" /> </el-form-item> </th> </tr> <tr> <th colspan="2"> 患者姓名:{{ patientsInfo.patientName }} </th> <th colspan="2"> 年龄:{{ patientsInfo.age }} </th> <th colspan="2">性别:{{ patientsInfo.patientGenderText }}</th> </tr> <tr> <td colspan="5" class="tdInput" style="text-align: center;"> 评估参数 </td> <td colspan="1" style="text-align: center;"> GNIR </td> </tr> <tr> <td colspan="2"> 身高 <el-input v-model="state.tableData.身高" placeholder="请输入身高"> <template #append>cm</template> </el-input> </td> <td colspan="2"> 体重 <el-input v-model="state.tableData.体重" placeholder="请输入体重"> <template #append>KG</template> </el-input> </td> <td colspan="2" rowspan="3" style="text-align: center;font-size: 18px;"> {{ sum }} <div v-if="sum"> <span v-if="sum<82">高营养风险</span> <span v-if="sum>=82&&sum<92">中营养风险</span> <span v-if="sum>=92&&sum<98">低营养风险</span> <span v-if="sum>98">无营养风险</span> </div> <br> </td> </tr> <tr> <td colspan="2"> 理想体重 <el-input readonly v-model="state.tableData.理想体重" placeholder="自动计算"> <template #append>KG</template> </el-input> </td> <td colspan="2"> 血清白蛋白浓度 <el-input v-model="state.tableData.血清白蛋白浓度" placeholder="轻输入血清白蛋白浓度"> <template #append>g/L</template> </el-input> </td> </tr> <tr> <td colspan="2"> <span style="color: #E6A23C;"> 无法测量身高,可以用膝高计算身高</span> <br> <el-checkbox v-model="state.tableData.无法测量身高" label="无法测量身高" /> </td> <td colspan="2"> 膝高: <el-input v-model.number="state.tableData.膝高" :disabled="!state.tableData.无法测量身高" placeholder="无法测量身高才输入膝高"> <template #append>cm</template> </el-input> </td> </tr> <tr> <td colspan="6" style="color: #E6A23C;"> 注意事项:<br> 对于直立困难而无法测量身高的患者,可以通过测量膝高来估算身高。 男性身高=2.02x膝高(cm)-0.04x年龄+64.19;<br> 女性身高=1.83x膝高(cm)-0.24x年龄+84.88。如果体重大于理想体重,<br> 体重与理想体重的比值以1计算。 </td> </tr> <tr> <td colspan="6" style="color: #E6A23C;"> GNIR营养评估分为4个等级:<br> 高营养风险(GNIR<82<br> 中营养风险(82≤GNIR<92)<br> 低营养风险(92≤GNIR≤98)<br> 无营养风险(GNIR>98) </td> </tr> </table> </div> </el-form> </div> </div> </div> <template #footer> <div class="dialog-footer" style="text-align: center"> <el-button @click="funhui">取消</el-button> <el-button type="primary" @click="onSubmit"> 保存 </el-button> </div> </template> </el-dialog> </div> </template> <script setup lang="ts" name="visualizingLinkDemo2"> import { reactive, onMounted, onUnmounted, ref, computed, watch } from 'vue'; import { formatDate } from '/@/utils/formatTime'; import { NextLoading } from '/@/utils/loading'; import { useUserInfo } from '/@/stores/userInfo'; import { usePatientsInfo } from '/@/stores/patientsInfo'; const storesPat = usePatientsInfo(); import { Add, update, deleteId, tiaochabiaoInfo } from '/@/api/tiaochabiao/index' import { storeToRefs } from 'pinia'; import { useRoute, useRouter } from 'vue-router'; import { ElMessage } from 'element-plus'; import { getPatData } from '/@/api/Patients'; import { number } from 'echarts'; const stores = useUserInfo(); const { patientsInfo } = storeToRefs(storesPat); const { userInfos } = storeToRefs(stores); const router = useRouter() const emit = defineEmits(["shuaxin"]); const state = reactive({ options: [0, 1], dialogTableVisible: false, tableData: { 表名: 'GNIR营养评估分', 初次调查日期: "", 填表日期: '', 更新日期: '', 记录者: '陈银成', 身高: '', 体重: '', 理想体重: '', 血清白蛋白浓度: '', 无法测量身高: false, 膝高: '' }, loading: false, viewInfo: { id: 0, code: '', clientCode: userInfos.value.clientCode, patientCode: patientsInfo.value.code, surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'), surveryPerson: userInfos.value.code, surveryJsonBody: '', suveryFormName: 'GNIR营养评估分', surveryFormType: 1, updateTime: '' } }) const isNumeric = (value: any) => { return /^-?\d+(\.\d+)?$/.test(value); } watch(() => state.tableData.身高, () => { if (isNumeric(state.tableData.身高)) { // return '有值' if (patientsInfo.value.patientGenderText === '男') { const x = ((0.75 * Number(state.tableData.身高)) - 62.5).toFixed(1) state.tableData.理想体重 = x } else { const x = ((0.60 * Number(state.tableData.身高)) - 40).toFixed(1) state.tableData.理想体重 = x } } else { state.tableData.理想体重 = '' } }) const sum = computed(() => { if (isNumeric(state.tableData.体重) && isNumeric(state.tableData.身高) && isNumeric(state.tableData.血清白蛋白浓度)) { if (Number(state.tableData.体重) <= Number(state.tableData.理想体重)) { return Number(((1.498 * Number(state.tableData.血清白蛋白浓度)) + (41.7 * ((Number(state.tableData.体重) / Number(state.tableData.理想体重))))).toFixed(2)) } else { return Number(((1.498 * Number(state.tableData.血清白蛋白浓度)) + 41.7).toFixed(2)) } } else{ return '' } }) const funhui = () => { state.dialogTableVisible = false } const onSubmit = () => { console.log('submit!') console.log(state.tableData) const info: tiaochabiaoInfo = { id: state.viewInfo.id, surveryFormType: 1, code: state.viewInfo.code, clientCode: userInfos.value.clientCode, patientCode: patientsInfo.value.code, surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'), surveryPerson: userInfos.value.code, surveryJsonBody: JSON.stringify(state.tableData), suveryFormName: 'GNIR营养评估分', updateTime: '' } console.log(info) if (info.id === 0) { Add(info).then(re => { console.log(re.data) state.dialogTableVisible = false emit('shuaxin') }) } else if (info.id > 0) { info.surveryTime = state.viewInfo.surveryTime update(info).then(re => { console.log(re.data) state.dialogTableVisible = false emit('shuaxin') }) } } // 第一步:定义子组件里面的方法 const getData = (str: string) => { console.log("子组件获取显示数据!" + str); state.loading = true } // 打开查看或者编辑明细 const openShow = (type: string, mode: tiaochabiaoInfo) => { console.log(type) if (type === 'add') { state.tableData.初次调查日期 = formatDate(new Date(), 'YYYY-mm-dd') state.tableData.更新日期 = formatDate(new Date(), 'YYYY-mm-dd') state.tableData.记录者 = userInfos.value.userName getPageInfo() state.dialogTableVisible = true } else if (type === 'update') { console.log('------------------------3333333333333333') console.log(mode) state.viewInfo = mode state.tableData = JSON.parse(mode.surveryJsonBody) state.dialogTableVisible = true } } const getPageInfo = async () => { const res = await getPatData({ patCode: patientsInfo.value.code, }) console.log(res.data, '----') state.tableData = { 表名: 'GNIR营养评估分', 初次调查日期: formatDate(new Date(), 'YYYY-mm-dd'), 填表日期: '', 更新日期: formatDate(new Date(), 'YYYY-mm-dd'), 记录者: userInfos.value.userName, 身高: res.data.身高, 体重: res.data.身高.上一次透前体重, 理想体重: '', 血清白蛋白浓度: '', 无法测量身高: false, 膝高: '' } } // 第二步:暴露方法 defineExpose({ getData, openShow }) </script> <style scoped lang="scss"> .gridtable { 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; text-align: left; border-color: #666666; background-color: #a4b0e2; } .gridtable td { border-width: 1px; padding: 8px; border-style: solid; border-color: #666666; background-color: #ffffff; } .tdInput { background: yellow; } </style> src/views/home/components/pingubiao/index.vue
@@ -11,6 +11,8 @@ <el-option label="营养风险筛查表(NRS2002)" value="营养风险筛查表(NRS2002)" /> <el-option label="营养不良炎症评分表(MIS)" value="营养不良炎症评分表(MIS)" /> <el-option label="主观全面评定(SGA)评价" value="主观全面评定(SGA)评价" /> <el-option label="PEW(蛋白质能量消耗评估)" value="PEW(蛋白质能量消耗评估)" /> <el-option label="GNIR营养评估分" value="GNIR营养评估分" /> </el-select> </el-form-item> <el-form-item label="填报日期"> @@ -83,6 +85,8 @@ <editDietary @shuaxin="onSubmit" ref="editDietaryRef"></editDietary> <editDietary2 @shuaxin="onSubmit" ref="editDietaryRef2"></editDietary2> <editDietary3 @shuaxin="onSubmit" ref="editDietaryRef3"></editDietary3> <editDietary4 @shuaxin="onSubmit" ref="editDietaryRef4"></editDietary4> <editDietary5 @shuaxin="onSubmit" ref="editDietaryRef5"></editDietary5> </div> </template> @@ -94,6 +98,8 @@ import editDietary2 from './editDietary2.vue' import editDietary3 from './editDietary3.vue' import editDietary from './editDietary.vue' import editDietary4 from './editDietary4.vue' import editDietary5 from './editDietary5.vue' import { useRoute,useRouter } from 'vue-router'; import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'; const storesPat = usePatientsInfo(); @@ -102,6 +108,8 @@ const editDietaryRef=ref() const editDietaryRef2=ref() const editDietaryRef3=ref() const editDietaryRef4=ref() const editDietaryRef5=ref() const router = useRouter() const shortcuts = [ { @@ -194,6 +202,10 @@ editDietaryRef2.value.openShow('add') }else if(state.formInline.formTableName==='营养不良炎症评分表(MIS)'){ editDietaryRef3.value.openShow('add') }else if(state.formInline.formTableName==='PEW(蛋白质能量消耗评估)'){ editDietaryRef4.value.openShow('add') }else if(state.formInline.formTableName==='GNIR营养评估分'){ editDietaryRef5.value.openShow('add') } }else{ ElMessage.warning('请先选择你要添加的表单名称!') @@ -244,6 +256,10 @@ editDietaryRef2.value.openShow('update',row) }else if(row.suveryFormName==='营养不良炎症评分表(MIS)'){ editDietaryRef3.value.openShow('update',row) }else if(row.suveryFormName==='PEW(蛋白质能量消耗评估)'){ editDietaryRef4.value.openShow('update',row) }else if(row.suveryFormName==='GNIR营养评估分'){ editDietaryRef5.value.openShow('update',row) } } const handleDelete = (index: number, row: any) => { src/views/home/index.vue
@@ -196,6 +196,7 @@ currentRow.value = val //缓存到vuex 中 storesPat.setPatientsInfo(val) console.log(val) getTabsData() } }