|
|
|
@ -50,6 +50,7 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button @click="initModel()" type="primary">{{buttons.add}}</el-button> |
|
|
|
<el-button @click="printReport()" type="primary">{{buttons.print}}</el-button> |
|
|
|
<el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{buttons.defaultTable}} |
|
|
|
</el-button> |
|
|
|
<el-button @click="userSetting" type="primary">{{ buttons.settingTable}}</el-button> |
|
|
|
@ -82,6 +83,12 @@ |
|
|
|
v-loading="dataListLoading" |
|
|
|
@selection-change="selectionChangeHandle" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
header-align="center" |
|
|
|
width="40" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
@ -534,7 +541,8 @@ import { |
|
|
|
search: '查询', |
|
|
|
download: '导出', |
|
|
|
settingTable: '设置列表', |
|
|
|
defaultTable: '设置默认配置' |
|
|
|
defaultTable: '设置默认配置', |
|
|
|
print : '打印', |
|
|
|
}, |
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
@ -758,27 +766,31 @@ import { |
|
|
|
}, |
|
|
|
// 打印方式 |
|
|
|
printReport(){ |
|
|
|
alert( this.$store.state.user.site) |
|
|
|
// |
|
|
|
// const LODOP = getLodop() |
|
|
|
// if (LODOP) { |
|
|
|
// var strBodyStyle = '<style>' |
|
|
|
// strBodyStyle += 'table { border-top: 1 solid #000000; border-left: 1 solid #000000; border-collapse:collapse; border-spacing:0;}' |
|
|
|
// strBodyStyle += 'caption { line-height:2em; }' |
|
|
|
// strBodyStyle += 'td { border-right: 1 solid #000000; border-bottom: 1 solid #000000; text-align:center; padding:2px 3px; font-size:11px;}' |
|
|
|
// strBodyStyle += '</style>' //设置打印样式 |
|
|
|
// var strFormHtml = strBodyStyle + '<body>' + document.getElementById('commmon').innerHTML + '</body>' //获取打印内容 |
|
|
|
// |
|
|
|
// LODOP.PRINT_INIT('') //初始化 |
|
|
|
// LODOP.PRINT_DESIGN(); |
|
|
|
// //LODOP.PREVIEW(); |
|
|
|
// //LODOP.PRINT(); |
|
|
|
// |
|
|
|
// LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A4') //设置横向 |
|
|
|
// LODOP.ADD_PRINT_HTM('1%', '1%', '98%', '98%', strFormHtml) //设置打印内容 |
|
|
|
// LODOP.SET_PREVIEW_WINDOW(2, 0, 0, 800, 600, '') //设置预览窗口模式和大小 |
|
|
|
// LODOP.PREVIEW() |
|
|
|
// } |
|
|
|
debugger |
|
|
|
let list = this.dataListSelections |
|
|
|
const LODOP = getLodop() |
|
|
|
if(list.length > 0){ |
|
|
|
if (LODOP) { |
|
|
|
LODOP.SET_LICENSES("","13F0BE83846277CB60918577C6281375","",""); |
|
|
|
|
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
let row = list[i] |
|
|
|
LODOP.NewPage(); |
|
|
|
LODOP.SET_PRINT_PAGESIZE(0,1000,400,""); |
|
|
|
LODOP.SET_PRINT_STYLE("FontSize",12); |
|
|
|
LODOP.SET_PRINT_STYLE("LineHeight",-2); |
|
|
|
LODOP.ADD_PRINT_BARCODE(3,3,300,120,"QRCode",row.locationId); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",12); |
|
|
|
LODOP.ADD_PRINT_TEXT(10,205,400,150,row.locationId ); |
|
|
|
LODOP.SET_PRINT_STYLEA(0,"FontSize",40); |
|
|
|
} |
|
|
|
|
|
|
|
LODOP.PRINT_DESIGN(); |
|
|
|
//LODOP.PREVIEW(); |
|
|
|
// LODOP.PRINT(); |
|
|
|
console.log("操作成功!") |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 校验用户是否收藏 |
|
|
|
favoriteIsOk(){ |
|
|
|
|