<template>
<div>
<div class="tableBox">
<a-table class="myTable" :customRow="setRow" rowKey="SLBH" :columns=columns :dataSource=data bordered :pagination="true"
:rowSelection="{selectedRowKeys:selectedRowKeys,onChange:onSelectChange,onSelect:onSelectRow,type:'radio'}" >
<template slot="title" slot-scope="currentPageData" >
<div style="height: 45px">
<div style="font-size: 30px;margin-bottom: 0;text-align: center">
<span style="float: left">历史操作记录</span>
<a-button class="printBtn" type="primary" size="large" icon="printer" v-on:click="Print()">打印</a-button>
</div>
</div>
</template>
</a-table>
</div>
</div>
</template>
<script type="text/ecmascript-6">
const column = [
{
title: '号码',
dataIndex: 'TXZHM',
width: '35%',
},{
title: '名称',
dataIndex: 'MC',
width: '30%',
},{
title: '时间',
width: '22%',
dataIndex: 'HandleDate',
}];
const d = [{
SLBH:'43243242346777771',
MC:'小票1',
TXZHM:'43243243244324',
HandleDate:'20190202'
},{
SLBH:'321324343243122356411',
TXZHM:'43243243244324',
MC:'小票2',
HandleDate:'20180303'
}
]
export default {
data() {
return {
data: d,
columns:column,
}
},
methods:{
//选择数据单选设置
setRow:function (record) {
let that = this;
return {
on: {
click: () => {
}
}
}
},
onSelectChange:function (selectedRowKeys, selectedRows) {
},
onSelectRow: function(record, selected, selectedRows) {
}
}
}
</script>
未封装成exe前在网页上打开
封装成exe后打开exe