luojie 2 months ago
parent
commit
aa3adadabe
3 changed files with 24 additions and 21 deletions
  1. +3
    -0
      src/views/business/comps/template/TemplateTable.vue
  2. +14
    -15
      src/views/business/form/nonTrial/comp/syff/Xq.vue
  3. +7
    -6
      src/views/business/resource/gsp/comps/rkjlList.vue

+ 3
- 0
src/views/business/comps/template/TemplateTable.vue View File

@ -290,6 +290,9 @@ export default {
getYqResource() {
return this.$refs.templateComponent.getYqResource();
},
getJcbList() {
return this.$refs.templateComponent.getJcbList();
},
getFilledFormData() {
return this.$refs.templateComponent.getFilledFormData();
},

+ 14
- 15
src/views/business/form/nonTrial/comp/syff/Xq.vue View File

@ -19,7 +19,7 @@
<div class="edit-content ">
<div class="pdf-layout">
<div class="pdf-content">
<pdf id="pdfBox" :page="pageNum" :src="pdfSrc" @progress="loadedRatio = $event"
<pdf id="pdfBox" :page="pageNum" :src="pdfUrl" @progress="loadedRatio = $event"
@num-pages="totalPages = $event"></pdf>
</div>
<div class="btn-layout" v-if="totalPages">
@ -64,6 +64,7 @@ export default {
return {
showExportBtn: false,
pdfSrc: '',
pdfUrl: '',
open: false,
pageNum: 1,
loadedRatio: 0, // 0-1 1
@ -115,22 +116,19 @@ export default {
getPageNum() {
const loadingTask = pdf.createLoadingTask({
url: this.pdfSrc,
cMapUrl: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@4.8.69/cmaps/',
withCredentials: false,
cMapUrl: 'https://unpkg.com/pdfjs-dist@2.16.105/cmaps/',
cMapPacked: true,
})
let that = this
//let loadingTask = pdf.createLoadingTask(this.pdfSrc);
loadingTask.promise
.then((pdf) => {
this.totalPages = pdf.numPages;
//this.loadPdfFromUrl()
// this.$nextTick(() => {
// this.setWatermarkContent();
// });
})
.catch((err) => {
that.$message.msgError("pdf加载失败");
});
loadingTask.promise.then(pdf => {
this.pdfDoc = pdf
this.totalPages = pdf.numPages
}).catch(err => {
console.error('PDF加载失败:', err)
})
this.pdfUrl = loadingTask
},
//
@ -151,6 +149,7 @@ export default {
closeYd(val) {
this.form.zt = val
this.cancel()
},
handleExport() {

+ 7
- 6
src/views/business/resource/gsp/comps/rkjlList.vue View File

@ -79,9 +79,8 @@
</el-col>
<el-col :span="1.5">
<!-- 导出 -->
<el-button type="primary" @click="exportExcel"
v-hasPermi="['business:resource:gsp:rkdc']">{{
$t('form.export') }}</el-button>
<el-button type="primary" @click="exportExcel" v-hasPermi="['business:resource:gsp:rkdc']">{{
$t('form.export') }}</el-button>
</el-col>
</el-row>
@ -98,6 +97,8 @@
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.rksj')" align="center" prop="rksj" width="150px"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.yxq')" align="center" prop="yxq" width="150px"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.rkl')" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.rkl }} {{ scope.row.rkdw }}
@ -150,8 +151,8 @@
v-hasPermi="['business:resource:gsp:rkjd']">{{
$t('page.business.resource.gsp.jiedang') }}</el-button>
<!-- 借阅 -->
<el-button type="text" v-if="scope.row.jlzt == 7 && scope.row.jyzt == 1 && id == scope.row.gdsqrId" @click="handleJy(scope.row)"
v-hasPermi="['business:resource:gsp:rkjy']">{{
<el-button type="text" v-if="scope.row.jlzt == 7 && scope.row.jyzt == 1 && id == scope.row.gdsqrId"
@click="handleJy(scope.row)" v-hasPermi="['business:resource:gsp:rkjy']">{{
$t('page.business.resource.gsp.jieyue') }}</el-button>
</template>
</el-table-column>
@ -338,7 +339,7 @@ export default {
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
that.$modal.closeLoading()
this.saveSimpleLog({name:'',nameEn:'',jcmc:'供试品入库记录导出',jcmcEn:'Test Item Reception Record Export'})
this.saveSimpleLog({ name: '', nameEn: '', jcmc: '供试品入库记录导出', jcmcEn: 'Test Item Reception Record Export' })
}).finally(() => {
that.$modal.closeLoading()
})

Loading…
Cancel
Save