<template>
    <div id="basic_software">
        <el-container>
            <el-table :data="softwareList" border style="width: 100%">
                <el-table-column prop="softwareName" label="软件名称" width="160"></el-table-column>
                <el-table-column prop="softwareExplain" label="软件说明" width="180"></el-table-column>
                <el-table-column label="操作" align="center" width="120">
                    <template slot-scope="scope">
                        <el-button @click="softwareDownload(scope.row)" type="primary" size="small">下载</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </el-container>
    </div>
</template>

<script>

    import { networkUrl } from '../../data/global_configuration'

    export default {
        name: 'basic_software',
        data() {
            return {
                softwareList: [
                    {
                        softwareName: '阅读器',
                        softwareExplain: '查看ofd格式的发票文件信息',
                        url: '/ext/GoldenBookReader_Personal_Install_free.exe'
                    },
                    {
                        softwareName: '打印控件',
                        softwareExplain: '进行发票打印的控件',
                        url: '/ext/PrintAssist.exe'
                    },
                    {
                        softwareName: '蓝票下载模板',
                        softwareExplain: '批量开票模版',
                        url: '/ext/blue_invoice_template.xlsx'
                    }
                ]
            }
        },
        methods: {
            // 文件下载
            softwareDownload(row) {
                let url = networkUrl()
                window.location.href = url + row.url
            }
        }
    }
</script>

<style scoped>

</style>
