|
|
@ -10,73 +10,181 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="right-top"> |
|
|
<div class="right-top"> |
|
|
<el-button @click="cancel()">{{ $t('form.close') }}</el-button> |
|
|
<el-button @click="cancel()">{{ $t('form.close') }}</el-button> |
|
|
|
|
|
<el-button type="primary" v-if="form.bdzt === 5 && form.tbzt === 1" @click="openApprove = true">{{ |
|
|
|
|
|
$t('page.business.study.studyFormPlan.tb') }}</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="edit-content "> |
|
|
|
|
|
<div class="content"> |
|
|
|
|
|
<!-- 1:流程;3:编辑;5:人员;7:修改;9:补充说明 --> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(-1)">{{ $t('page.business.study.studyFormPlan.dcqbjcgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(1)">{{ $t('page.business.study.studyFormPlan.dclcjcgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(3)">{{ $t('page.business.study.studyFormPlan.dcbjjcgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(7)">{{ $t('page.business.study.studyFormPlan.dcxgjcgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(999)">{{ $t('page.business.study.studyFormPlan.dcbhsjgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<TemplateTable ref="templateTable" :sn="form.templateSn" fillType="audit" :templateData="form" /> |
|
|
|
|
|
<div class="content-title"> |
|
|
|
|
|
<div class="line"></div> |
|
|
|
|
|
<div class="subtitle"> {{ $t('page.business.study.studyFormPlan.qmxx') }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="pal"> |
|
|
|
|
|
<el-table :data="qmxxList" v-loading="loadingQmxx"> |
|
|
|
|
|
<el-table-column :label="$t('page.business.study.studyFormPlan.qmr')" align="center" prop="qmrMc" |
|
|
|
|
|
width="150px" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.study.studyFormPlan.qmyy')" align="center" |
|
|
|
|
|
:prop="$i18n.locale === 'zh_CN' ? 'qmyy' : 'qmyyEn'" width="150px" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.study.studyFormPlan.qmsj')" align="center" prop="createTime" |
|
|
|
|
|
width="150px" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.study.studyFormPlan.bzyy')" align="center" prop="remark" |
|
|
|
|
|
:show-overflow-tooltip="true" /> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="pal"> |
|
|
|
|
|
<pagination v-show="totalQmxx > 0" :total="totalQmxx" :page.sync="queryParamsQmxx.pageNum" |
|
|
|
|
|
|
|
|
<!-- 1:流程;3:编辑;5:人员;7:修改;9:补充说明 --> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(-1)">{{ $t('page.business.study.studyFormPlan.dcqbjcgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(1)">{{ $t('page.business.study.studyFormPlan.dclcjcgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(3)">{{ $t('page.business.study.studyFormPlan.dcbjjcgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(7)">{{ $t('page.business.study.studyFormPlan.dcxgjcgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button type="primary" @click="exportExcel(999)">{{ $t('page.business.study.studyFormPlan.dcbhsjgj') }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<div class="edit-content"> |
|
|
|
|
|
<div class="detail-content" style="width: 100%; height: 100%;"> |
|
|
|
|
|
<vue-html2pdf :show-layout="true" pdf-content-width="100%" :pdf-format="form.templatePdfSize" :pdf-quality="2" |
|
|
|
|
|
:float-layout="false" pdf-orientation="landscape" :paginate-elements-by-height="0" :enable-download="true" |
|
|
|
|
|
:preview-modal="false" :filename="form.bdmc" @beforeDownload="addDynamicWatermark" ref="html2Pdf" |
|
|
|
|
|
@progress="onProgress"> |
|
|
|
|
|
<section slot="pdf-content"> |
|
|
|
|
|
<div class="pdf-content"> |
|
|
|
|
|
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="detail" /> |
|
|
|
|
|
<div v-if="showExport" style="width: 100%; padding: 0px 30px ;"> |
|
|
|
|
|
<div class="content-title" style="margin-bottom: 10px;"> |
|
|
|
|
|
<div class="line"></div> |
|
|
|
|
|
<div class="subtitle"> {{ $t('page.business.study.studyFormPlan.qmxx') }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<table class="datatable"> |
|
|
|
|
|
<thead> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th style="width: 20%;">{{ $t('page.business.study.studyFormPlan.qmr') }}</th> |
|
|
|
|
|
<th style="width: 20%;">{{ $t('page.business.study.studyFormPlan.qmyy') }}</th> |
|
|
|
|
|
<th style="width: 20%;">{{ $t('page.business.study.studyFormPlan.qmsj') }}</th> |
|
|
|
|
|
<th style="width: 40%;">{{ $t('page.business.study.studyFormPlan.bzyy') }}</th> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</thead> |
|
|
|
|
|
<tbody> |
|
|
|
|
|
<tr v-for="(item, index) in qmxxExportList" :key="index"> |
|
|
|
|
|
<td>{{ item.qmrMc }}</td> |
|
|
|
|
|
<td>{{ $i18n.locale === 'zh_CN' ? item.qmyy : item.qmyyEn }}</td> |
|
|
|
|
|
<td>{{ item.createTime }}</td> |
|
|
|
|
|
<td>{{ item.remark }}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</tbody> |
|
|
|
|
|
</table> |
|
|
|
|
|
<div class="content-title" style="margin-top: 10px;" v-show="jcgjlxExport != 999"> |
|
|
|
|
|
<div class="line"></div> |
|
|
|
|
|
<div class="subtitle"> {{ $t('page.business.study.studyFormPlan.jcgj') }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<JcgjList ref="jcgjExportList" :readonly="true" v-show="jcgjlxExport != 999" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div v-if="showExport" id="watermark-overlay" ref="watermarkContainer" :style="{ |
|
|
|
|
|
'--watermark-text': `'${watermarkText}'`, |
|
|
|
|
|
'--watermark-opacity': opacity, |
|
|
|
|
|
'--watermark-size': '14px', |
|
|
|
|
|
'--watermark-color': 'red' |
|
|
|
|
|
}"></div> |
|
|
|
|
|
</section> |
|
|
|
|
|
</vue-html2pdf> |
|
|
|
|
|
<div style="padding: 0px 20px 0px 30px;margin-left: 10px;"> |
|
|
|
|
|
<div class="content-title"> |
|
|
|
|
|
<div class="line"></div> |
|
|
|
|
|
<div class="subtitle"> {{ $t('page.business.study.studyFormPlan.qmxx') }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="pal"> |
|
|
|
|
|
<el-table :data="qmxxList" v-loading="loadingQmxx" style="width: 100%;"> |
|
|
|
|
|
<el-table-column :label="$t('page.business.study.studyFormPlan.qmr')" align="center" prop="qmrMc" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.study.studyFormPlan.qmyy')" align="center" |
|
|
|
|
|
:prop="$i18n.locale === 'zh_CN' ? 'qmyy' : 'qmyyEn'" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.study.studyFormPlan.qmsj')" align="center" |
|
|
|
|
|
prop="createTime" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.study.studyFormPlan.bzyy')" align="center" prop="remark" /> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
<pagination v small layout="prev, pager, next" :total="totalQmxx" :page.sync="queryParamsQmxx.pageNum" |
|
|
:limit.sync="queryParamsQmxx.pageSize" @pagination="getQmxxList" /> |
|
|
:limit.sync="queryParamsQmxx.pageSize" @pagination="getQmxxList" /> |
|
|
|
|
|
<div class="content-title" style="margin-top: 10px;"> |
|
|
|
|
|
<div class="line"></div> |
|
|
|
|
|
<div class="subtitle"> {{ $t('page.business.study.studyFormPlan.jcgj') }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" /> |
|
|
|
|
|
<pagination v small layout="prev, pager, next" :total="jcgjTotal" @pagination="getJjcgjList" /> |
|
|
</div> |
|
|
</div> |
|
|
<div class="content-title"> |
|
|
|
|
|
<div class="line"></div> |
|
|
|
|
|
<div class="subtitle"> {{ $t('page.business.study.studyFormPlan.jcgj') }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" /> |
|
|
|
|
|
<pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal" |
|
|
|
|
|
@pagination="getJjcgjList" /> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 填报 --> |
|
|
|
|
|
<el-dialog :title="$t('page.business.study.studyFormPlan.cjjl')" :visible.sync="openApprove" width="500px" |
|
|
|
|
|
append-to-body :close-on-click-modal="false"> |
|
|
|
|
|
<el-form ref="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px" v-if="openApprove"> |
|
|
|
|
|
<el-alert :title="$t('page.business.study.studyFormPlan.ts')" :closable="false" type="success"> |
|
|
|
|
|
</el-alert> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item :label="$t('form.qmyy')" prop="qmyy"> |
|
|
|
|
|
<el-input type="text" :value="formApprove.qmyy" maxlength="50" disabled |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item :label="$t('form.remark')" prop="remark"> |
|
|
|
|
|
<el-input type="textarea" v-model="formApprove.remark" :rows="5" maxlength="500" |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item :label="$t('form.signer')"> |
|
|
|
|
|
<el-input type="text" v-model="nickName" maxlength="50" disabled |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item :label="$t('form.password')" prop="qmrmm"> |
|
|
|
|
|
<el-input type="password" show-password v-model="formApprove.qmrmm" maxlength="20" |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click="approve">{{ $t('form.confirm') }}</el-button> |
|
|
|
|
|
<el-button @click="openApprove = false">{{ $t('form.cancel') }}</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { studyFormPlan_info, studyFormPlan_jcgj, studyFormPlan_qmxx, studyFormPlan_exportDetail } from "@/api/business/study/studyFormPlan" |
|
|
|
|
|
|
|
|
import { studyFormPlan_jcgjqmxxList, studyFormPlan_tb, studyFormPlan_info, studyFormPlan_jcgj, studyFormPlan_qmxx, studyFormPlan_exportDetail } from "@/api/business/study/studyFormPlan" |
|
|
import { mapGetters } from 'vuex' |
|
|
import { mapGetters } from 'vuex' |
|
|
import JcgjList from "@/views/business/comps/common/JcgjList"; |
|
|
import JcgjList from "@/views/business/comps/common/JcgjList"; |
|
|
import TemplateTable from '@/views/business/comps/template/TemplateTable'; |
|
|
import TemplateTable from '@/views/business/comps/template/TemplateTable'; |
|
|
|
|
|
|
|
|
|
|
|
import moment from "moment"; |
|
|
|
|
|
import VueHtml2pdf from 'vue-html2pdf' |
|
|
export default { |
|
|
export default { |
|
|
name: "Xq", |
|
|
name: "Xq", |
|
|
components: { JcgjList, TemplateTable }, |
|
|
|
|
|
|
|
|
components: { JcgjList, TemplateTable, VueHtml2pdf }, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
watermarkText:'', |
|
|
|
|
|
opacity: 0.8, |
|
|
|
|
|
watermarkOpacity: 0.8, |
|
|
|
|
|
watermarkSize: 40, |
|
|
|
|
|
openApprove: false, |
|
|
|
|
|
formApprove: { |
|
|
|
|
|
id: null, |
|
|
|
|
|
qmyy: this.$t('page.business.study.studyFormPlan.cjjl'), |
|
|
|
|
|
remark: '', |
|
|
|
|
|
qmrmm: '', |
|
|
|
|
|
}, |
|
|
|
|
|
rulesApprove: { |
|
|
|
|
|
qmrmm: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}] |
|
|
|
|
|
}, |
|
|
qmxxList: [], |
|
|
qmxxList: [], |
|
|
totalQmxx: 0, |
|
|
totalQmxx: 0, |
|
|
loadingQmxx: true, |
|
|
loadingQmxx: true, |
|
|
queryParamsQmxx: { |
|
|
queryParamsQmxx: { |
|
|
formId: null, |
|
|
formId: null, |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
pageSize: 9999 |
|
|
|
|
|
|
|
|
pageSize: 5 |
|
|
}, |
|
|
}, |
|
|
open: false, |
|
|
open: false, |
|
|
showIndex: 1, |
|
|
showIndex: 1, |
|
|
@ -99,8 +207,12 @@ export default { |
|
|
queryParamsJcgj: { |
|
|
queryParamsJcgj: { |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
formId: null, |
|
|
formId: null, |
|
|
pageSize: 9999, |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
pageSize: 5, |
|
|
|
|
|
}, |
|
|
|
|
|
showExport: false, |
|
|
|
|
|
qmxxExportList: [], |
|
|
|
|
|
jcgjExportList: [], |
|
|
|
|
|
jcgjlxExport: 0 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -111,8 +223,120 @@ export default { |
|
|
created() { |
|
|
created() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
updateWatermark() { |
|
|
|
|
|
// 创建水印背景 |
|
|
|
|
|
const text = this.nickName +' '+ moment().format("YYYY-MM-DD HH:mm:ss"); |
|
|
|
|
|
const canvas = document.createElement('canvas'); |
|
|
|
|
|
const ctx = canvas.getContext('2d'); |
|
|
|
|
|
|
|
|
|
|
|
// 设置canvas尺寸 |
|
|
|
|
|
canvas.width = 300; |
|
|
|
|
|
canvas.height = 300; |
|
|
|
|
|
|
|
|
|
|
|
// 绘制水印 |
|
|
|
|
|
ctx.fillStyle = `rgba(255, 0, 0, ${this.opacity})`; |
|
|
|
|
|
ctx.font = '12px Arial'; |
|
|
|
|
|
ctx.textAlign = 'center'; |
|
|
|
|
|
ctx.textBaseline = 'middle'; |
|
|
|
|
|
|
|
|
|
|
|
// 旋转45度 |
|
|
|
|
|
ctx.translate(canvas.width / 2, canvas.height / 2); |
|
|
|
|
|
ctx.rotate(-45 * Math.PI / 180); |
|
|
|
|
|
ctx.fillText(text, 0, 0); |
|
|
|
|
|
|
|
|
|
|
|
// 设置为背景 |
|
|
|
|
|
const container = this.$refs.watermarkContainer; |
|
|
|
|
|
container.style.backgroundImage = `url(${canvas.toDataURL()})`; |
|
|
|
|
|
container.style.backgroundRepeat = 'repeat'; |
|
|
|
|
|
}, |
|
|
|
|
|
onProgress(progress) { |
|
|
|
|
|
console.log(`生成进度: ${progress}%`) |
|
|
|
|
|
this.removePageBreak() |
|
|
|
|
|
if (progress == 100) { |
|
|
|
|
|
this.showExport = false |
|
|
|
|
|
this.$modal.closeLoading() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
exportExcel(jcgjlx) { |
|
|
exportExcel(jcgjlx) { |
|
|
this.$modal.loading() |
|
|
this.$modal.loading() |
|
|
|
|
|
this.jcgjlxExport = jcgjlx |
|
|
|
|
|
this.showExport = true |
|
|
|
|
|
studyFormPlan_jcgjqmxxList({ jcgjlx: jcgjlx, id: this.form.id }).then(response => { |
|
|
|
|
|
this.jcgjExportList = response.data.jcgj |
|
|
|
|
|
this.qmxxExportList = response.data.qmxx |
|
|
|
|
|
this.updateWatermark() |
|
|
|
|
|
this.$refs.jcgjExportList.init(this.jcgjExportList) |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.$refs.html2Pdf.generatePdf() |
|
|
|
|
|
}, 200); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
//添加水印 |
|
|
|
|
|
async addDynamicWatermark({ pdfContent }) { |
|
|
|
|
|
return new Promise((resolve) => { |
|
|
|
|
|
const canvas = document.createElement('canvas') |
|
|
|
|
|
const ctx = canvas.getContext('2d') |
|
|
|
|
|
|
|
|
|
|
|
// 获取内容区域尺寸 |
|
|
|
|
|
const rect = this.$refs.contentArea.getBoundingClientRect() |
|
|
|
|
|
canvas.width = rect.width |
|
|
|
|
|
canvas.height = rect.height |
|
|
|
|
|
|
|
|
|
|
|
// 绘制动态水印 |
|
|
|
|
|
ctx.fillStyle = `rgba(100, 100, 100, ${this.watermarkOpacity})` |
|
|
|
|
|
ctx.font = `${this.watermarkSize}px Arial` |
|
|
|
|
|
ctx.textAlign = 'center' |
|
|
|
|
|
ctx.textBaseline = 'middle' |
|
|
|
|
|
|
|
|
|
|
|
// 计算水印密度 |
|
|
|
|
|
const stepX = 300 |
|
|
|
|
|
const stepY = 200 |
|
|
|
|
|
|
|
|
|
|
|
// 绘制倾斜水印 |
|
|
|
|
|
ctx.save() |
|
|
|
|
|
ctx.translate(canvas.width / 2, canvas.height / 2) |
|
|
|
|
|
ctx.rotate(-Math.PI / 4) // 45度倾斜 |
|
|
|
|
|
|
|
|
|
|
|
for (let x = -canvas.width; x < canvas.width * 2; x += stepX) { |
|
|
|
|
|
for (let y = -canvas.height; y < canvas.height * 2; y += stepY) { |
|
|
|
|
|
// 动态水印内容 |
|
|
|
|
|
const dynamicText = `${this.watermarkText} - ${this.getCurrentTime()}` |
|
|
|
|
|
ctx.fillText(dynamicText, x, y) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
ctx.restore() |
|
|
|
|
|
|
|
|
|
|
|
// 创建水印层 |
|
|
|
|
|
const watermarkLayer = document.createElement('div') |
|
|
|
|
|
watermarkLayer.className = 'watermark-layer' |
|
|
|
|
|
watermarkLayer.style.cssText = ` |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
pointer-events: none; |
|
|
|
|
|
background-image: url(${canvas.toDataURL('image/png')}); |
|
|
|
|
|
background-repeat: repeat; |
|
|
|
|
|
z-index: 9999; |
|
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
|
|
// 插入水印 |
|
|
|
|
|
this.$refs.contentArea.style.position = 'relative' |
|
|
|
|
|
this.$refs.contentArea.appendChild(watermarkLayer) |
|
|
|
|
|
|
|
|
|
|
|
// 等待渲染 |
|
|
|
|
|
setTimeout(() => resolve(), 100) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
//移除分页空白 |
|
|
|
|
|
removePageBreak() { |
|
|
|
|
|
document.querySelectorAll('.html2pdf__page-break').forEach(el => { |
|
|
|
|
|
el.remove() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
exportExcel_bak(jcgjlx) { |
|
|
|
|
|
this.$modal.loading() |
|
|
studyFormPlan_exportDetail(_.merge({}, this.queryParamsJcgj, { jcgjlx: jcgjlx, lang: this.$store.getters.language.split("_")[0] })).then(response => { |
|
|
studyFormPlan_exportDetail(_.merge({}, this.queryParamsJcgj, { jcgjlx: jcgjlx, lang: this.$store.getters.language.split("_")[0] })).then(response => { |
|
|
window.open(process.env.VUE_APP_FILE_DOMAIN + response.msg) |
|
|
window.open(process.env.VUE_APP_FILE_DOMAIN + response.msg) |
|
|
}).finally(() => { |
|
|
}).finally(() => { |
|
|
@ -157,6 +381,7 @@ export default { |
|
|
show(row) { |
|
|
show(row) { |
|
|
this.reset() |
|
|
this.reset() |
|
|
this.$modal.loading() |
|
|
this.$modal.loading() |
|
|
|
|
|
this.formApprove.id = row.id |
|
|
this.queryParamsJcgj.formId = row.id |
|
|
this.queryParamsJcgj.formId = row.id |
|
|
this.queryParamsQmxx.formId = row.id |
|
|
this.queryParamsQmxx.formId = row.id |
|
|
studyFormPlan_info({ id: row.id }).then(response => { |
|
|
studyFormPlan_info({ id: row.id }).then(response => { |
|
|
@ -167,7 +392,164 @@ export default { |
|
|
}).finally(() => { |
|
|
}).finally(() => { |
|
|
this.$modal.closeLoading() |
|
|
this.$modal.closeLoading() |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
approve() { |
|
|
|
|
|
this.$refs["formApprove"].validate(valid => { |
|
|
|
|
|
if (valid) { |
|
|
|
|
|
this.$modal.loading() |
|
|
|
|
|
studyFormPlan_tb(this.formApprove).then(response => { |
|
|
|
|
|
this.openApprove = false |
|
|
|
|
|
this.$emit('close') |
|
|
|
|
|
this.open = false |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
this.$modal.closeLoading() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
<style scoped> |
|
|
|
|
|
.content-title { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
background: #f9f9ff; |
|
|
|
|
|
font-size: 0.96rem; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
padding-left: 10px; |
|
|
|
|
|
height: 40px; |
|
|
|
|
|
line-height: 40px; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: flex-start; |
|
|
|
|
|
text-align: left; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.line { |
|
|
|
|
|
width: 2px; |
|
|
|
|
|
float: left; |
|
|
|
|
|
height: 16px; |
|
|
|
|
|
margin-top: 12px; |
|
|
|
|
|
margin-right: 8px; |
|
|
|
|
|
border-left: #3178ff 3px solid; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.subtitle { |
|
|
|
|
|
height: 40px; |
|
|
|
|
|
line-height: 40px; |
|
|
|
|
|
color: #464647 !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.pdf-content { |
|
|
|
|
|
padding: 20px; |
|
|
|
|
|
font-family: Arial, sans-serif; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
#watermark-overlay { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
opacity: 0.6; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
pointer-events: none; |
|
|
|
|
|
z-index: 10; |
|
|
|
|
|
color: red; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.pdf-content h1 { |
|
|
|
|
|
color: #333; |
|
|
|
|
|
border-bottom: 2px solid #4CAF50; |
|
|
|
|
|
padding-bottom: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.pdf-content table { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
border-collapse: collapse; |
|
|
|
|
|
margin-top: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.pdf-content th, |
|
|
|
|
|
.pdf-content td { |
|
|
|
|
|
border: 1px solid #ddd; |
|
|
|
|
|
padding: 8px; |
|
|
|
|
|
text-align: left; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.pdf-content th { |
|
|
|
|
|
background-color: #f2f2f2; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.datatable { |
|
|
|
|
|
border-collapse: collapse; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.upload-file-list .el-upload-list__item { |
|
|
|
|
|
margin-bottom: 0px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.datatable thead { |
|
|
|
|
|
border-left: 1px solid #d0d0d0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.datatable th { |
|
|
|
|
|
padding: 5px 5px 4px 5px; |
|
|
|
|
|
max-width: 200px; |
|
|
|
|
|
line-height: 35px; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
color: #414753; |
|
|
|
|
|
background: #F5F7FA; |
|
|
|
|
|
border: 1px solid #d0d0d0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.el-dialog__body { |
|
|
|
|
|
padding: 10px 20px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.datatable th.operate { |
|
|
|
|
|
padding: 5px 5px 4px 5px; |
|
|
|
|
|
width: 100px; |
|
|
|
|
|
line-height: 35px; |
|
|
|
|
|
background: #F5F7FA; |
|
|
|
|
|
border: 1px solid #d0d0d0; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.datatable .rowAlt td, |
|
|
|
|
|
.datatable tbody tr:nth-child(2n) td { |
|
|
|
|
|
background: #F5F7FA; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.datatable td { |
|
|
|
|
|
border: solid 1px #d0d0d0; |
|
|
|
|
|
padding: 3px 5px 4px 5px; |
|
|
|
|
|
max-width: 100px; |
|
|
|
|
|
color: #414753; |
|
|
|
|
|
line-height: 35px; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.html2pdf__page-break { |
|
|
|
|
|
display: none !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.content { |
|
|
|
|
|
position: relative; |
|
|
|
|
|
z-index: 1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.controls { |
|
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
padding: 10px; |
|
|
|
|
|
background: #f5f5f5; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
input { |
|
|
|
|
|
margin: 0 10px; |
|
|
|
|
|
padding: 8px; |
|
|
|
|
|
} |
|
|
|
|
|
</style> |