jquery;导出pdf
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
"echarts": "^4.2.0-rc.2",
|
"echarts": "^4.2.0-rc.2",
|
||||||
"element-ui": "2.4.6",
|
"element-ui": "2.4.6",
|
||||||
"file-saver": "^1.3.8",
|
"file-saver": "^1.3.8",
|
||||||
|
"jquery": "^3.3.1",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.0",
|
||||||
"node-sass": "^4.10.0",
|
"node-sass": "^4.10.0",
|
||||||
"normalize.css": "7.0.0",
|
"normalize.css": "7.0.0",
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
<b>二维码:</b><br>
|
<b>二维码:</b><br>
|
||||||
<img id="img">
|
<img id="img">
|
||||||
</div>
|
</div>
|
||||||
<div id="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
|
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
|
||||||
<el-card v-show="searchView">
|
<el-card v-show="searchView">
|
||||||
<!--将新一般处理页添加至通讯服务器-->
|
<!--将新一般处理页添加至通讯服务器-->
|
||||||
<div>附件图:</div>
|
<div>附件图:</div>
|
||||||
@@ -155,7 +155,8 @@
|
|||||||
import { initContract, initBuyer, searchTable1, searchTable2 } from '@/api/PurchasingCenter/PurchaseContractSearch'
|
import { initContract, initBuyer, searchTable1, searchTable2 } from '@/api/PurchasingCenter/PurchaseContractSearch'
|
||||||
import { searchFile } from '@/api/PurchasingCenter/CreateContract'
|
import { searchFile } from '@/api/PurchasingCenter/CreateContract'
|
||||||
import QRCode from 'qrcode'
|
import QRCode from 'qrcode'
|
||||||
import { exportExcelMethod } from './exportExcel'
|
import $ from 'jquery'
|
||||||
|
// import { exportExcelMethod } from './exportExcel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -213,7 +214,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
download() {
|
download() {
|
||||||
if (this.contractValue) {
|
if (this.contractValue) {
|
||||||
exportExcelMethod('print', '采购合同', '采购合同sheet1')
|
// exportExcelMethod('print', '采购合同', '采购合同sheet1')
|
||||||
|
const htmlNode = $('#print').html()
|
||||||
|
const body = $('body')
|
||||||
|
body.children().hide()
|
||||||
|
const printNode = $(htmlNode)
|
||||||
|
body.append(printNode)
|
||||||
|
window.print()
|
||||||
|
body.children().show()
|
||||||
|
printNode.remove()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请选择合同')
|
this.$message.error('请选择合同')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user