|
|
@ -232,55 +232,27 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
printRwd() { |
|
|
|
if (this.multipleSelection.length > 1) { |
|
|
|
if (this.multipleSelection.length && this.multipleSelection.length > 1) { |
|
|
|
this.$message({ message: '只能打印一份任务单', type: 'error' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.apibjd({ |
|
|
|
url: '/renwu/printRwd', |
|
|
|
|
|
|
|
this.preview({ |
|
|
|
url: '/print/generatePdfRwd', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
rwdIds: this.multipleSelection[0].id |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
this.preview({ |
|
|
|
url: '/print/generatePdfListing', |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
info: data.info, |
|
|
|
paramList: data.paramList, |
|
|
|
viewType: 'RWD' |
|
|
|
rwdId: this.multipleSelection[0].id |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
data = data.replace(/\\/g, '/') |
|
|
|
// router.push({ path: '/preview/1/1/urlPath?src=' + store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) + '&v=' + Math.random() }) |
|
|
|
window.open(data) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
batchPrintRwd() { |
|
|
|
if (this.multipleSelection.length === 0) { |
|
|
|
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' }) |
|
|
|
return false |
|
|
|
} |
|
|
|
this.apibjd({ |
|
|
|
url: '/renwu/printRwdBatch', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
rwdId: this.$refs.list.selection.map(rwd => { |
|
|
|
return rwd.id |
|
|
|
}).join(',') |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
this.preview({ |
|
|
|
url: '/print/generatePdfListingBatch', |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
list: data, |
|
|
|
viewType: 'RWD' |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
if (data === 'success') { |
|
|
|
this.preview({ |
|
|
|
url: '/print/createXmlOther', |
|
|
|
method: 'post', |
|
|
@ -293,11 +265,6 @@ export default { |
|
|
|
}).then(data => { |
|
|
|
this.printbutton = 'ReportPrintApp://' + data |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ message: '未能成功调用打印程序!', type: 'error' }) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
getTeamList(departmentId) { // 获取对应组 |
|
|
|
this.apibjd({ |
|
|
|