两个表格-左右布局

<template>
    <div class="LeftRightLayout">
    <!-- 患者列表来的异常数量弹窗 -->
        <div style="width:20%;height: 100%" v-if="textCode == 'JHTableList'">
            <el-table :data="LabResult" border class="eltable" height='100%' 
                :header-cell-style="{'text-align':'center',background:'rgb(15, 73, 237,.1)',color:'#333333','font-size': '14px',
                    'font-family': 'PingFang SC','font-weight': '700','border-color': '#CFDBFB'}" 
                :cell-style="{'text-align':'center','border-color': '#CFDBFB',padding:'0px'}" stripe style="width: 98%"
                :row-class-name="tableRowClassName" :row-style="{height:'36px'}" @row-click="goPDetails" :resizable="true">
                <el-table-column prop="RepTime" label="报告日期" width="">
                </el-table-column>
                <el-table-column prop="LabName" label="检验类型" width="">
                </el-table-column>
            </el-table>
        </div>
        
<!-- 患者列表来的异常数量弹窗 -->
        <div style="width:79%;height: 100%;vertical-align: top;" v-if="textCode == 'JHTableList'">
            <el-table :data="rowLabResult" border class="eltable" height= '100%'
                :header-cell-style="{'text-align':'center',background:'rgb(15, 73, 237,.1)',color:'#333333','font-size': '14px',
                    'font-family': 'PingFang SC','font-weight': '700','border-color': '#CFDBFB'}" 
                :cell-style="{'text-align':'center','border-color': '#CFDBFB',padding:'0px'}" stripe style="width: 98%"
                :row-class-name="tableRowClassName" :row-style="{height:'36px'}" :resizable="true">
                <el-table-column
                    label="项目名称" prop="ItemName"></el-table-column>
                <el-table-column
                    label="检验结果" prop="ItemValue"></el-table-column>
                <el-table-column
                    label="单位" prop="ItemUnit"></el-table-column>
                <el-table-column
                    label="参考范围" prop="Range"></el-table-column>
                <el-table-column
                    label="趋势">
                    <template slot-scope="scope">
                        <i class="iconfont iconqushi" v-if="scope.row.IsNumeric" @click="ShowChart(scope.row)" style="color:#3350FF;cursor: pointer;"></i>
                    </template>
                </el-table-column>
            </el-table>
        </div>

注意会出现两个表格不对齐的情况,用vertical-align: top;在解决的

.LeftRightLayout {
  height: 100%;
     margin-left: 5px;
 }
 .LeftRightLayout div{
     display: inline-block;
 }

在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值