预览加水印
This commit is contained in:
@@ -152,7 +152,11 @@
|
||||
<!-- <img v-if="!fullscreen" class="full-screen" src="@/assets/imgs/icon-full.png" alt="" @click="fullscreen = !fullscreen">
|
||||
<img v-else class="full-screen" src="@/assets/imgs/icon-small.png" alt="" @click="fullscreen = !fullscreen"> -->
|
||||
<el-scrollbar>
|
||||
<div class="preview-content" v-html="content"></div>
|
||||
<!-- 这里用v-if是让水印更新 -->
|
||||
<div class="preview-content"
|
||||
v-if="dialogPreview"
|
||||
v-watermark="{ text: watermarkText, width: 300, textColor: 'rgba(100, 100, 100, 0.6)', isFull: true }"
|
||||
v-html="content"></div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -161,12 +165,14 @@
|
||||
|
||||
<script>
|
||||
import {downloadFile} from "../../utils/downloadFile";
|
||||
import {formatDate} from '@/utils/date'
|
||||
|
||||
export default {
|
||||
name: "ReportList",
|
||||
data() {
|
||||
return {
|
||||
fullscreen: false,
|
||||
watermarkText: '', // 水印
|
||||
fullscreen: false,
|
||||
q: {
|
||||
keyContent: '',
|
||||
year: [],
|
||||
@@ -284,6 +290,8 @@ export default {
|
||||
// 预览
|
||||
previewRow(row) {
|
||||
this.fullscreen = false;
|
||||
// 更新预览水印的时间戳
|
||||
this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`;
|
||||
this.$api.report.reportGetReportHtmlId({id: row.id}).then(({data}) => {
|
||||
this.content = data.content;
|
||||
this.dialogPreview = true;
|
||||
|
||||
@@ -366,7 +366,11 @@
|
||||
<!-- <img v-if="!fullscreen" class="full-screen" src="@/assets/imgs/icon-full.png" alt="" @click="fullscreen = !fullscreen">
|
||||
<img v-else class="full-screen" src="@/assets/imgs/icon-small.png" alt="" @click="fullscreen = !fullscreen"> -->
|
||||
<el-scrollbar>
|
||||
<div class="preview-content" v-html="content"></div>
|
||||
<!-- 这里用v-if是让水印更新 -->
|
||||
<div class="preview-content"
|
||||
v-if="dialogPreview"
|
||||
v-watermark="{ text: watermarkText, width: 300, textColor: 'rgba(100, 100, 100, 0.6)', isFull: true }"
|
||||
v-html="content"></div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -376,11 +380,13 @@
|
||||
<script>
|
||||
import {fileType} from '@/utils/fileType'
|
||||
import {downloadFile} from "../../utils/downloadFile";
|
||||
import {formatDate} from '@/utils/date'
|
||||
|
||||
export default {
|
||||
name: "ReportManager",
|
||||
data() {
|
||||
return {
|
||||
watermarkText: '', // 水印
|
||||
fullscreen: false,
|
||||
/* =============================================== 操作日志 =============================================== */
|
||||
dialogLog: false, // 操作日志
|
||||
@@ -855,17 +861,17 @@ export default {
|
||||
this.labelList();
|
||||
let rowData = JSON.parse(JSON.stringify(row));
|
||||
if(rowData.labelOneName !== '-'){
|
||||
this.labelOne = {id: rowData.labelOneId, rowData: rowData.labelOneName};
|
||||
this.labelOne = {id: rowData.labelOneId, rowData: rowData.labelOneName};
|
||||
}else{
|
||||
this.labelOne = {};
|
||||
}
|
||||
if(rowData.labelTwoName !== '-'){
|
||||
this.labelTwo = {id: rowData.labelTwoId, name: rowData.labelTwoName};
|
||||
this.labelTwo = {id: rowData.labelTwoId, name: rowData.labelTwoName};
|
||||
}else{
|
||||
this.labelTwo = {};
|
||||
}
|
||||
if(rowData.labelThreeName !== '-'){
|
||||
this.labelThree = {id: rowData.labelThreeId, name: rowData.labelThreeName};
|
||||
this.labelThree = {id: rowData.labelThreeId, name: rowData.labelThreeName};
|
||||
}else{
|
||||
this.labelThree = {};
|
||||
}
|
||||
@@ -946,6 +952,8 @@ export default {
|
||||
// 预览
|
||||
previewRow(row) {
|
||||
this.fullscreen = false;
|
||||
// 更新预览水印的时间戳
|
||||
this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`;
|
||||
this.$api.report.reportGetReportHtmlId({id: row.id}).then(({data}) => {
|
||||
this.content = data.content;
|
||||
this.dialogPreview = true;
|
||||
|
||||
Reference in New Issue
Block a user