<template>
|
<div class="dietarySurvey-home">
|
<div v-if="patientsInfo.id">
|
222
|
<ItemTable></ItemTable>
|
|
</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';
|
import ItemTable from './dietaryDtaile.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;min-width: 100px;}
|
.input-underline {
|
border: none; /* 移除所有边框 */
|
border-bottom: 1px solid #ccc; /* 显示下边框 */
|
outline: none; /* 移除点击输入框时浏览器可能会提供的默认轮廓线 */
|
text-align: center;
|
}
|
.width50{
|
width: 50px;
|
}
|
|
|
</style>
|