<template>
    <el-dialog
        title="选择模板"
        width="1000px"
        :visible.sync="visible"
        :before-close="_close"
    >
        <div class="inspectionTitle">
            <p>姓名：<span>张三</span></p>
            <p>证件号：<span>张三</span></p>
            <p>性别：<span>张三</span></p>
            <p>类型：<span>张三</span></p>
            <p>金额：<span>张三</span></p>
        </div>
        <div style="margin:10px 0;">
           <el-input v-model="name" placeholder="" style="width:150px;"></el-input> 
        </div>
        <div style="display:flex;">
            <div style="width: 151px;">
                <el-table :data="tableData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
                    <el-table-column align="center" prop="name" label="模板名称" width="150">
                        <template slot-scope="scope">{{ scope.row.date }}</template>
                    </el-table-column>
                </el-table> 
            </div>
            <el-table :data="tableData" border height="300" style="flex:1;margin-left:20px;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
                <el-table-column type="selection" width="55" align="center"></el-table-column>
                <el-table-column align="center" prop="name" label="项目名称">
                    <template slot-scope="scope">{{ scope.row.date }}</template>
                </el-table-column>
                <el-table-column align="center" prop="name" label="数量">
                    <template slot-scope="scope">{{ scope.row.date }}</template>
                </el-table-column>
                <el-table-column align="center" prop="name" label="单位">
                    <template slot-scope="scope">{{ scope.row.date }}</template>
                </el-table-column>
                <el-table-column align="center" prop="name" label="金额">
                    <template slot-scope="scope">{{ scope.row.date }}</template>
                </el-table-column>
            </el-table> 
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="hide">取 消</el-button>
            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
        </div>
    </el-dialog>         
</template>

<script>
export default {
    data(){
        return{
            visible:false,
            tableData: [{
            date: '2016-05-02',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1518 弄'
            }, {
            date: '2016-05-04',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1517 弄'
            }, {
            date: '2016-05-01',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1519 弄'
            }, {
            date: '2016-05-03',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1516 弄'
            }]
        }
    },
    methods:{
        _close: function(done) {
            // this.clear()
            done()
        },
        clear: function() {
            this.form.id = 0;
            this.form.name = "";
            this.form.intro = "";
        },
        show() {
            // this.clear()
            this.visible = true
        },
        hide() {
            // this.clear()
            this.visible = false
        },
    }
}
</script>

<style lang="scss" scoped>
.inspectionTitle{
    display:flex;
    justify-content: space-between;
    span{
        min-width:80px;
        display:inline-block;
        
    }
}
</style>

