<template>
    <div style="height: 5%"></div>
    <div style="height: 95%">
        <el-auto-resizer>
            <template #default="{ height, width }">
                <vxe-table :data="props.emrData['手术']" :height="height" show-overflow
                           :row-config="{isHover : true, isCurrent: true,height: 24}">
                    <vxe-column title="操作" fixed="left" width="50">
                        <template #default="{row}">
                            <el-button text @click="emits('to-fill-in-data',row)" type="primary">填充</el-button>
                        </template>
                    </vxe-column>
                    <vxe-column title="手术日期" field="手术日期"/>
                    <vxe-column title="拟行手术名称" prop="拟行手术名称"/>
                    <vxe-column title="术前诊断名称" prop="术前诊断名称"/>
                    <vxe-column title="一助" prop="第一助手名称" width="90"/>
                    <vxe-column title="二助" prop="第二助手名称" width="90"/>
                    <vxe-column title="三助" prop="第三助手名称" width="90"/>
                    <vxe-column title="麻醉方式名称" prop="麻醉方式名称"/>
                </vxe-table>
            </template>
        </el-auto-resizer>
    </div>
</template>

<script setup name='EmrOperation'>

const props = defineProps({
    emrData: {
        type: Object
    }
})

const emits = defineEmits(['to-fill-in-data'])

onMounted(() => {
    console.log(props.emrData['手术'])
})

</script>

<style scoped lang="scss">

</style>
